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.
This commit is contained in:
JosJuice 2016-07-01 13:07:57 +02:00
parent f8bf839e36
commit b210769ea0
1 changed files with 3 additions and 0 deletions

View File

@ -224,6 +224,9 @@ void ApplyFramePatches()
void Shutdown()
{
onFrame.clear();
speedHacks.clear();
ActionReplay::ApplyCodes({});
Gecko::SetActiveCodes({});
}
} // namespace