summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2016-07-01 13:07:57 +0200
committerJosJuice <josjuice@gmail.com>2016-07-01 13:07:57 +0200
commitb210769ea0aa03b9c95f9bad20eca0321cd90cc1 (patch)
tree02e4ba969877c0c4a36a00c9e695b5e52eb7e7c3 /Source/Core
parentf8bf839e36ecd0addcc07b841a1dca66bf90dca9 (diff)
PatchEngine: Clear active codes on shutdown
The active codes normally get cleared when a game boots, because LoadPatches gets called, replacing the codes from the previous game. However, there were cases where LoadPatches doesn't get called, and then codes from the previous game would be used for the current game. This commit clears the codes on shutdown so that it doesn't matter whether the boot process loads LoadPatches.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/PatchEngine.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/Core/Core/PatchEngine.cpp b/Source/Core/Core/PatchEngine.cpp
index eef8f919b8..9a4302c15b 100644
--- a/Source/Core/Core/PatchEngine.cpp
+++ b/Source/Core/Core/PatchEngine.cpp
@@ -224,6 +224,9 @@ void ApplyFramePatches()
void Shutdown()
{
onFrame.clear();
+ speedHacks.clear();
+ ActionReplay::ApplyCodes({});
+ Gecko::SetActiveCodes({});
}
} // namespace