diff --git a/OpenParrot/src/Functions/Games/Other/PauseGameFixes.cpp b/OpenParrot/src/Functions/Games/Other/PauseGameFixes.cpp index a0b7e8b..6e1bef4 100644 --- a/OpenParrot/src/Functions/Games/Other/PauseGameFixes.cpp +++ b/OpenParrot/src/Functions/Games/Other/PauseGameFixes.cpp @@ -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); } \ No newline at end of file diff --git a/OpenParrot/src/Functions/Global.cpp b/OpenParrot/src/Functions/Global.cpp index 0ba037d..0f1f3d5 100644 --- a/OpenParrot/src/Functions/Global.cpp +++ b/OpenParrot/src/Functions/Global.cpp @@ -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;