From 614dc1069e08366828f6d97818812eda1ad0dc91 Mon Sep 17 00:00:00 2001 From: hrydgard Date: Sat, 20 Dec 2008 12:10:59 +0000 Subject: More code reorganization. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1605 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindow.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'Source/Core/DebuggerWX/Src/CodeWindow.cpp') diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index 4931c090b1..c1cd760bca 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -496,7 +496,9 @@ void CCodeWindow::OnJITOff(wxCommandEvent& event) // creates the SCoreStartupParameter as a game is loaded GetMenuBar()->Check(event.GetId(),!event.IsChecked()); wxMessageBox(_T("Please start a game before changing mode.")); - } else { + } + else + { if (Core::GetState() != Core::CORE_RUN) { switch (event.GetId()) @@ -504,9 +506,8 @@ void CCodeWindow::OnJITOff(wxCommandEvent& event) case IDM_JITUNLIMITED: Core::g_CoreStartupParameter.bJITUnlimitedCache = event.IsChecked(); jit.ClearCache(); // allow InitCache() even after the game has started - jit.InitCache(); GetMenuBar()->Enable(event.GetId(),!event.IsChecked()); - break; + return; // avoid a second jit.ClearCache case IDM_JITOFF: Core::g_CoreStartupParameter.bJITOff = event.IsChecked(); break; case IDM_JITLSOFF: @@ -531,15 +532,15 @@ void CCodeWindow::OnJITOff(wxCommandEvent& event) Core::g_CoreStartupParameter.bJITSystemRegistersOff = event.IsChecked(); break; } jit.ClearCache(); - } else { + } + else + { //event.Skip(); // this doesn't work GetMenuBar()->Check(event.GetId(),!event.IsChecked()); wxMessageBox(_T("Please pause the emulator before changing mode.")); } } } -// ============== - void CCodeWindow::OnJitMenu(wxCommandEvent& event) { -- cgit v1.2.3