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

Fix for twisted metal 2

This commit is contained in:
FunkyFr3sh 2020-09-27 13:38:41 +02:00
parent 434fb86d9c
commit 27323efa4b
4 changed files with 7 additions and 6 deletions

View File

@ -4,7 +4,7 @@
#define VERSION_MAJOR 1
#define VERSION_MINOR 3
#define VERSION_BUILD 6
#define VERSION_REVISION 0
#define VERSION_REVISION 1
#define VERSION VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION
#define VERSION_STRING ver_str(VERSION_MAJOR, VERSION_MINOR, VERSION_BUILD, VERSION_REVISION)

View File

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

View File

@ -1837,10 +1837,11 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
}
else
{
This->lpVtbl->SetDisplayMode1 = ddraw_SetDisplayMode;
if (!This->tm2hack)
This->lpVtbl->SetDisplayMode1 = ddraw_SetDisplayMode;
}
if (This->ddrawrefcount0)
if (This->tm2hack)
return 0;
return This->Ref;

View File

@ -43,7 +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
ddraw->tm2hack = GetBool("tm2hack", FALSE); // Twisted Metal 2 hack
ddraw->sierrahack = GetBool("sierrahack", FALSE); // Sierra Caesar III, Pharaoh, and Zeus hack
WindowRect.right = GetInt("width", 0);
@ -452,7 +452,7 @@ static void CreateSettingsIni()
"renderer=gdi\n"
"maxgameticks=60\n"
"handlemouse=false\n"
"ddrawrefcount0=true\n"
"tm2hack=true\n"
"\n"
"; Caesar III\n"
"[c3]\n"