mirror of
https://github.com/FunkyFr3sh/cnc-ddraw.git
synced 2025-03-15 06:04:49 +01:00
make sure the game.exe preset is only used for cnc games (and not for diablo 2...)
This commit is contained in:
parent
9e1397d0f6
commit
8e8fd808af
@ -352,8 +352,9 @@ static void CreateSettingsIni()
|
||||
"maxfps=59\n"
|
||||
"accuratetimers=true\n"
|
||||
"\n"
|
||||
"; Command & Conquer: Tiberian Sun\n"
|
||||
"; Command & Conquer: Tiberian Sun / Command & Conquer: Red Alert 2\n"
|
||||
"[game]\n"
|
||||
"checkfile=.\\blowfish.dll\n"
|
||||
"noactivateapp=true\n"
|
||||
"handlemouse=false\n"
|
||||
"maxfps=60\n"
|
||||
@ -410,7 +411,17 @@ static DWORD GetString(LPCSTR key, LPCSTR defaultValue, LPSTR outString, DWORD o
|
||||
{
|
||||
DWORD s = GetPrivateProfileStringA(ProcessFileName, key, "", outString, outSize, SettingsIniPath);
|
||||
if (s > 0)
|
||||
return s;
|
||||
{
|
||||
char buf[MAX_PATH] = { 0 };
|
||||
|
||||
if (GetPrivateProfileStringA(ProcessFileName, "checkfile", "", buf, sizeof(buf), SettingsIniPath) > 0)
|
||||
{
|
||||
if (GetFileAttributes(buf) != INVALID_FILE_ATTRIBUTES)
|
||||
return s;
|
||||
}
|
||||
else
|
||||
return s;
|
||||
}
|
||||
|
||||
return GetPrivateProfileStringA("ddraw", key, defaultValue, outString, outSize, SettingsIniPath);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user