2021-07-01 18:02:16 +02:00
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
|
|
|
|
#include <vcl.h>
|
2023-08-13 17:15:59 +02:00
|
|
|
#include <IniFiles.hpp>
|
2021-07-01 18:02:16 +02:00
|
|
|
#pragma hdrstop
|
|
|
|
#include <tchar.h>
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
#include <Vcl.Styles.hpp>
|
|
|
|
#include <Vcl.Themes.hpp>
|
|
|
|
USEFORM("ConfigFormUnit.cpp", ConfigForm);
|
|
|
|
//---------------------------------------------------------------------------
|
|
|
|
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
Application->Initialize();
|
|
|
|
Application->MainFormOnTaskBar = true;
|
2023-08-13 17:15:59 +02:00
|
|
|
|
|
|
|
auto *ini = new TIniFile(".\\ddraw.ini");
|
|
|
|
auto theme = ini->ReadString("ddraw", "configtheme", "Windows10");
|
|
|
|
|
|
|
|
TStyleManager::TrySetStyle(
|
|
|
|
theme == "Cobalt XEMedia" ? "Cobalt XEMedia" : "Windows10");
|
|
|
|
|
|
|
|
delete ini;
|
|
|
|
|
2021-07-01 18:02:16 +02:00
|
|
|
Application->CreateForm(__classid(TConfigForm), &ConfigForm);
|
|
|
|
Application->Run();
|
|
|
|
}
|
|
|
|
catch (Exception &exception)
|
|
|
|
{
|
|
|
|
Application->ShowException(&exception);
|
|
|
|
}
|
|
|
|
catch (...)
|
|
|
|
{
|
|
|
|
try
|
|
|
|
{
|
|
|
|
throw Exception("");
|
|
|
|
}
|
|
|
|
catch (Exception &exception)
|
|
|
|
{
|
|
|
|
Application->ShowException(&exception);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
//---------------------------------------------------------------------------
|