1
0
mirror of synced 2024-11-14 23:07:36 +01:00

Add Pause to Dirty Drivin

This commit is contained in:
Aaron M 2021-09-15 22:43:09 +12:00
parent 429ec65f78
commit a3b3617078
2 changed files with 16 additions and 3 deletions

View File

@ -4,7 +4,7 @@
#include "Functions/Global.h"
#include "Utility/Helper.h"
bool PauseGameFixInit;
static bool PauseGameFixInit;
static DWORD TimerValue;
void PauseGameFixes(Helpers* helpers)
@ -18,4 +18,16 @@ void PauseGameFixes(Helpers* helpers)
}
helpers->WriteIntPtr(0x9C4A07, TimerValue, false);
}
if (GameDetect::currentGame == GameID::DirtyDrivin)
helpers->WriteByte(0x99D894, 0x01, false);
}
void ResetPauseGameFixes(Helpers* helpers)
{
if (GameDetect::currentGame == GameID::SR3)
PauseGameFixInit = false;
if (GameDetect::currentGame == GameID::DirtyDrivin)
helpers->WriteByte(0x99D894, 0x00, false);
}

View File

@ -28,8 +28,9 @@ static char PauseKeyChar[256];
static char ExitKeyChar[256];
static int PauseKeyValue;
static int ExitKeyValue;
extern bool PauseGameFixInit;
extern void PauseGameFixes(Helpers* helpers);
extern void ResetPauseGameFixes(Helpers* helpers);
void *__cdecl memcpy_0(void *a1, const void *a2, size_t a3)
{
@ -125,7 +126,7 @@ static BOOL SuspendProcess(DWORD ProcessId, bool Suspend)
if (SuspendPressedOff)
{
SuspendPressedOff = false;
PauseGameFixInit = false;
ResetPauseGameFixes(0);
waveOutSetVolume(NULL, dwVolume);
SuspendProcess(ProcessID, false);
break;