summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorRachel Bryk <RachelBryk@gmail.com>2013-07-25 16:43:00 -0400
committerRachel Bryk <RachelBryk@gmail.com>2013-07-25 16:43:00 -0400
commitbff2bc1288fa4309e1b2aef1486845ba01311100 (patch)
tree0b991175b267d733cd7fb3f6a0cd17870adc53d8 /Source/Core
parent4deea2bcae93aa62a95c08fe396a4f93a64ec6bc (diff)
Clear patches on shutdown.
Fixes issue 6434.
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/Core/Src/Core.cpp3
-rw-r--r--Source/Core/Core/Src/PatchEngine.cpp5
-rw-r--r--Source/Core/Core/Src/PatchEngine.h1
3 files changed, 9 insertions, 0 deletions
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<Patch> &patches, IniFile
void LoadPatches(const char *gameID);
void ApplyFramePatches();
void ApplyARPatches();
+void Shutdown();
inline int GetPatchTypeCharLength(PatchType type)
{