From b210769ea0aa03b9c95f9bad20eca0321cd90cc1 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Fri, 1 Jul 2016 13:07:57 +0200 Subject: [PATCH] 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. --- Source/Core/Core/PatchEngine.cpp | 3 +++ 1 file changed, 3 insertions(+) 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