From 67aee8a19cf9e98bc3fe87a0f2a28eccf40e9329 Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Wed, 27 Jul 2016 13:07:09 +0300 Subject: [PATCH] patches: reset also patches on VM restart This should fully fix #851 --- pcsx2/Patch.cpp | 6 ++++++ pcsx2/Patch.h | 1 + pcsx2/System/SysCoreThread.cpp | 1 + 3 files changed, 8 insertions(+) diff --git a/pcsx2/Patch.cpp b/pcsx2/Patch.cpp index c161cd6879..9803dc86cf 100644 --- a/pcsx2/Patch.cpp +++ b/pcsx2/Patch.cpp @@ -176,6 +176,12 @@ void inifile_process(wxTextFile &f1 ) } } +void ResetPatchesCount() +{ + patchnumber = 0; +} + + void ResetCheatsCount() { cheatnumber = 0; diff --git a/pcsx2/Patch.h b/pcsx2/Patch.h index 246350a4fb..a426fcd794 100644 --- a/pcsx2/Patch.h +++ b/pcsx2/Patch.h @@ -57,6 +57,7 @@ namespace PatchFunc PATCHTABLEFUNC cheat; } +extern void ResetPatchesCount(); extern void ResetCheatsCount(); extern int LoadCheats(wxString name, const wxDirName& folderName, const wxString& friendlyName); extern int LoadCheatsFromZip(wxString gameCRC, const wxString& cheatsArchiveFilename); diff --git a/pcsx2/System/SysCoreThread.cpp b/pcsx2/System/SysCoreThread.cpp index aab8c9161f..0b93e22ddc 100644 --- a/pcsx2/System/SysCoreThread.cpp +++ b/pcsx2/System/SysCoreThread.cpp @@ -198,6 +198,7 @@ void SysCoreThread::_reset_stuff_as_needed() m_resetVirtualMachine = false; m_resetVsyncTimers = false; + ResetPatchesCount(); ResetCheatsCount(); }