From f8ea1824b7ffb3419563322d1dffa48fc8a595e6 Mon Sep 17 00:00:00 2001 From: John Peterson Date: Thu, 3 Sep 2009 23:28:28 +0000 Subject: [PATCH] GUI: Gray step button in JIT mode git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4192 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/DebuggerWX/Src/CodeWindow.cpp | 52 +++++++++++------------ 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/Source/Core/DebuggerWX/Src/CodeWindow.cpp b/Source/Core/DebuggerWX/Src/CodeWindow.cpp index 1159d34a1d..c9cc39d820 100644 --- a/Source/Core/DebuggerWX/Src/CodeWindow.cpp +++ b/Source/Core/DebuggerWX/Src/CodeWindow.cpp @@ -581,29 +581,8 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event) // Clear the JIT cache to enable these changes jit.ClearCache(); -} - - -// Shortcuts -bool CCodeWindow::UseInterpreter() -{ - return GetMenuBar()->IsChecked(IDM_INTERPRETER); -} -bool CCodeWindow::BootToPause() -{ - return GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE); -} -bool CCodeWindow::AutomaticStart() -{ - return GetMenuBar()->IsChecked(IDM_AUTOMATICSTART); -} -bool CCodeWindow::UnlimitedJITCache() -{ - return GetMenuBar()->IsChecked(IDM_JITUNLIMITED); -} -bool CCodeWindow::JITBlockLinking() -{ - return GetMenuBar()->IsChecked(IDM_JITBLOCKLINKING); + // Update + UpdateButtonStates(); } void CCodeWindow::OnJitMenu(wxCommandEvent& event) { @@ -630,6 +609,28 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event) } +// Shortcuts +bool CCodeWindow::UseInterpreter() +{ + return GetMenuBar()->IsChecked(IDM_INTERPRETER); +} +bool CCodeWindow::BootToPause() +{ + return GetMenuBar()->IsChecked(IDM_BOOTTOPAUSE); +} +bool CCodeWindow::AutomaticStart() +{ + return GetMenuBar()->IsChecked(IDM_AUTOMATICSTART); +} +bool CCodeWindow::UnlimitedJITCache() +{ + return GetMenuBar()->IsChecked(IDM_JITUNLIMITED); +} +bool CCodeWindow::JITBlockLinking() +{ + return GetMenuBar()->IsChecked(IDM_JITBLOCKLINKING); +} + /////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // Toolbar @@ -704,7 +705,6 @@ void CCodeWindow::UpdateButtonStates() if (!Initialized) { ToolBar->EnableTool(IDM_DEBUG_GO, false); - ToolBar->EnableTool(IDM_STEP, false); ToolBar->EnableTool(IDM_STEPOVER, false); ToolBar->EnableTool(IDM_SKIP, false); } @@ -716,7 +716,6 @@ void CCodeWindow::UpdateButtonStates() ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Pause")); ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugPause]); ToolBar->EnableTool(IDM_DEBUG_GO, true); - ToolBar->EnableTool(IDM_STEP, false); ToolBar->EnableTool(IDM_STEPOVER, false); ToolBar->EnableTool(IDM_SKIP, false); } @@ -726,11 +725,12 @@ void CCodeWindow::UpdateButtonStates() ToolBar->SetToolLabel(IDM_DEBUG_GO, _("Play")); ToolBar->SetToolBitmap(IDM_DEBUG_GO, m_Bitmaps[Toolbar_DebugGo]); ToolBar->EnableTool(IDM_DEBUG_GO, true); - ToolBar->EnableTool(IDM_STEP, true); ToolBar->EnableTool(IDM_STEPOVER, true); ToolBar->EnableTool(IDM_SKIP, true); } } + + ToolBar->EnableTool(IDM_STEP, Initialized && Stepping && UseInterpreter()); if (ToolBar) ToolBar->Realize();