1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 06:04:49 +01:00

Add Twisted Metal 2 section to ddraw.ini

This commit is contained in:
FunkyFr3sh 2020-09-23 04:37:28 +02:00
parent 9fedb74895
commit ad16993376
3 changed files with 12 additions and 0 deletions

View File

@ -131,6 +131,7 @@ typedef struct IDirectDrawImpl
BOOL hidecursor;
BOOL accurateTimers;
BOOL resizable;
BOOL ddrawrefcount0;
BOOL bnetActive;
BOOL bnetWasFullscreen;
BOOL bnetWasUpscaled;

View File

@ -1818,6 +1818,9 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
return 0;
}
if (This->ddrawrefcount0)
return 0;
return This->Ref;
}

View File

@ -43,6 +43,7 @@ void Settings_Load()
ddraw->vhack = GetBool("vhack", FALSE);
ddraw->accurateTimers = GetBool("accuratetimers", FALSE);
ddraw->resizable = GetBool("resizable", TRUE);
ddraw->ddrawrefcount0 = GetBool("ddrawrefcount0", FALSE); // Twisted Metal 2 DirectDraw Error hack
WindowRect.right = GetInt("width", 0);
WindowRect.bottom = GetInt("height", 0);
@ -443,6 +444,13 @@ static void CreateSettingsIni()
"maxfps=60\n"
"forcefps=true\n"
"\n"
"; Twisted Metal 2\n"
"[Tm2]\n"
"renderer=gdi\n"
"maxgameticks=60\n"
"handlemouse=false\n"
"ddrawrefcount0=true\n"
"\n"
, fh);
fclose(fh);