From bff2bc1288fa4309e1b2aef1486845ba01311100 Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Thu, 25 Jul 2013 16:43:00 -0400 Subject: [PATCH] Clear patches on shutdown. Fixes issue 6434. --- Source/Core/Core/Src/Core.cpp | 3 +++ Source/Core/Core/Src/PatchEngine.cpp | 5 +++++ Source/Core/Core/Src/PatchEngine.h | 1 + 3 files changed, 9 insertions(+) diff --git a/Source/Core/Core/Src/Core.cpp b/Source/Core/Core/Src/Core.cpp index e6ef8d5703..0aaa1a89d3 100644 --- a/Source/Core/Core/Src/Core.cpp +++ b/Source/Core/Core/Src/Core.cpp @@ -56,6 +56,7 @@ #include "State.h" #include "Movie.h" +#include "PatchEngine.h" // TODO: ugly, remove bool g_aspect_wide; @@ -278,6 +279,8 @@ void Stop() // - Hammertime! INFO_LOG(CONSOLE, "Stop [Main Thread]\t\t---- Shutdown complete ----"); Movie::Shutdown(); + PatchEngine::Shutdown(); + g_bStopping = false; } diff --git a/Source/Core/Core/Src/PatchEngine.cpp b/Source/Core/Core/Src/PatchEngine.cpp index ad990d8fed..2221fe456f 100644 --- a/Source/Core/Core/Src/PatchEngine.cpp +++ b/Source/Core/Core/Src/PatchEngine.cpp @@ -211,4 +211,9 @@ void ApplyARPatches() ActionReplay::RunAllActive(); } +void Shutdown() +{ + onFrame.clear(); +} + } // namespace diff --git a/Source/Core/Core/Src/PatchEngine.h b/Source/Core/Core/Src/PatchEngine.h index 700f311b7c..87b3e8c901 100644 --- a/Source/Core/Core/Src/PatchEngine.h +++ b/Source/Core/Core/Src/PatchEngine.h @@ -40,6 +40,7 @@ void LoadPatchSection(const char *section, std::vector &patches, IniFile void LoadPatches(const char *gameID); void ApplyFramePatches(); void ApplyARPatches(); +void Shutdown(); inline int GetPatchTypeCharLength(PatchType type) {