From a7cce0f10537e2b1e09e775f4a2759877aaa82db Mon Sep 17 00:00:00 2001 From: LunaMoo Date: Wed, 28 Jan 2015 09:06:00 +0100 Subject: [PATCH] Close cheat menu before editing file. --- UI/CwCheatScreen.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/UI/CwCheatScreen.cpp b/UI/CwCheatScreen.cpp index 8ee5489735..1eadd78ec7 100644 --- a/UI/CwCheatScreen.cpp +++ b/UI/CwCheatScreen.cpp @@ -146,6 +146,14 @@ UI::EventReturn CwCheatScreen::OnAddCheat(UI::EventParams ¶ms) { UI::EventReturn CwCheatScreen::OnEditCheatFile(UI::EventParams ¶ms) { std::string cheatFile; + std::fstream fs; + fs.close(); + g_Config.bReloadCheats = true; + g_Config.Save(); + if (MIPSComp::jit) { + MIPSComp::jit->ClearCache(); + } + screenManager()->finishDialog(this, DR_OK); #ifdef _WIN32 cheatFile = activeCheatFile; // Can't rely on a .txt file extension to auto-open in the right editor,