always use full path to avoid issues with working directories in wine

This commit is contained in:
FunkyFr3sh 2024-04-03 00:37:24 +02:00
parent bf7a3d021a
commit 51d9ef58d9
2 changed files with 19 additions and 13 deletions

View file

@ -3,6 +3,7 @@
#include <vcl.h>
#pragma hdrstop
#include <IniFiles.hpp>
#include <IOUtils.hpp>
#include <System.Hash.hpp>
#include <tchar.h>
//---------------------------------------------------------------------------
@ -10,6 +11,9 @@
#include <Vcl.Themes.hpp>
USEFORM("ConfigFormUnit.cpp", ConfigForm);
//---------------------------------------------------------------------------
#define GAME_PATH (TPath::GetDirectoryName(Application->ExeName) + "\\")
int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
{
try
@ -31,7 +35,7 @@ int WINAPI _tWinMain(HINSTANCE, HINSTANCE, LPTSTR, int)
return 0;
}
auto *ini = new TIniFile(".\\ddraw.ini");
auto *ini = new TIniFile(GAME_PATH + "ddraw.ini");
auto theme = ini->ReadString("ddraw", "configtheme", "Windows10");
TStyleManager::TrySetStyle(