summaryrefslogtreecommitdiff
path: root/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
diff options
context:
space:
mode:
authorMat M <mathew1800@gmail.com>2016-10-13 15:45:20 -0400
committerGitHub <noreply@github.com>2016-10-13 15:45:20 -0400
commit14facbc438fed7ec3c2d1a0e7045ba1b47b5a8c2 (patch)
tree2c3218a05ecb220786e6ee676c1c19cabfbe12a8 /Source/Core/DolphinWX/Debugger/CodeWindow.cpp
parent5541237b74e058393ff9eb01beb6823fef161223 (diff)
parent6a67b571cca0cb86ac873a117122f47b0f62728e (diff)
Merge pull request #4339 from lioncash/wx-menu
DolphinWX: Move debugger menu item creation to CFrame
Diffstat (limited to 'Source/Core/DolphinWX/Debugger/CodeWindow.cpp')
-rw-r--r--Source/Core/DolphinWX/Debugger/CodeWindow.cpp108
1 files changed, 2 insertions, 106 deletions
diff --git a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
index b3b4bf8ac6..388160f384 100644
--- a/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
+++ b/Source/Core/DolphinWX/Debugger/CodeWindow.cpp
@@ -459,110 +459,6 @@ void CCodeWindow::UpdateCallstack()
callstack->Append(StrToWxStr("invalid callstack"));
}
-// Create CPU Mode menus
-void CCodeWindow::CreateMenu(const SConfig& core_startup_parameter, wxMenuBar* pMenuBar)
-{
- // CPU Mode
- wxMenu* pCoreMenu = new wxMenu;
-
- wxMenuItem* interpreter = pCoreMenu->Append(
- IDM_INTERPRETER, _("&Interpreter Core"),
- _("This is necessary to get break points"
- " and stepping to work as explained in the Developer Documentation. But it can be very"
- " slow, perhaps slower than 1 fps."),
- wxITEM_CHECK);
- interpreter->Check(core_startup_parameter.iCPUCore == PowerPC::CORE_INTERPRETER);
- pCoreMenu->AppendSeparator();
-
- pCoreMenu->Append(IDM_JIT_NO_BLOCK_LINKING, _("&JIT Block Linking Off"),
- _("Provide safer execution by not linking the JIT blocks."), wxITEM_CHECK);
-
- pCoreMenu->Append(IDM_JIT_NO_BLOCK_CACHE, _("&Disable JIT Cache"),
- _("Avoid any involuntary JIT cache clearing, this may prevent Zelda TP from "
- "crashing.\n[This option must be selected before a game is started.]"),
- wxITEM_CHECK);
- pCoreMenu->Append(IDM_CLEAR_CODE_CACHE, _("&Clear JIT Cache"));
-
- pCoreMenu->AppendSeparator();
- pCoreMenu->Append(IDM_LOG_INSTRUCTIONS, _("&Log JIT Instruction Coverage"));
- pCoreMenu->Append(IDM_SEARCH_INSTRUCTION, _("&Search for an Instruction"));
-
- pCoreMenu->AppendSeparator();
- pCoreMenu->Append(IDM_JIT_OFF, _("&JIT Off (JIT Core)"),
- _("Turn off all JIT functions, but still use the JIT core from Jit.cpp"),
- wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LS_OFF, _("&JIT LoadStore Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LSLBZX_OFF, _(" &JIT LoadStore lbzx Off"), wxEmptyString,
- wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LSLXZ_OFF, _(" &JIT LoadStore lXz Off"), wxEmptyString,
- wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LSLWZ_OFF, _("&JIT LoadStore lwz Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LSF_OFF, _("&JIT LoadStore Floating Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_LSP_OFF, _("&JIT LoadStore Paired Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_FP_OFF, _("&JIT FloatingPoint Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_I_OFF, _("&JIT Integer Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_P_OFF, _("&JIT Paired Off"), wxEmptyString, wxITEM_CHECK);
- pCoreMenu->Append(IDM_JIT_SR_OFF, _("&JIT SystemRegisters Off"), wxEmptyString, wxITEM_CHECK);
-
- pMenuBar->Append(pCoreMenu, _("&JIT"));
-
- // Debug Menu
- wxMenu* pDebugMenu = new wxMenu;
-
- pDebugMenu->Append(IDM_STEP, _("Step &Into\tF11"));
- pDebugMenu->Append(IDM_STEPOVER, _("Step &Over\tF10"));
- pDebugMenu->Append(IDM_STEPOUT, _("Step O&ut\tSHIFT+F11"));
- pDebugMenu->Append(IDM_TOGGLE_BREAKPOINT, _("Toggle &Breakpoint\tF9"));
- pDebugMenu->AppendSeparator();
-
- wxMenu* pPerspectives = new wxMenu;
- Parent->m_SavedPerspectives = new wxMenu;
- pDebugMenu->AppendSubMenu(pPerspectives, _("Perspectives"), _("Edit Perspectives"));
- pPerspectives->Append(IDM_SAVE_PERSPECTIVE, _("Save Perspectives"),
- _("Save currently-toggled perspectives"));
- pPerspectives->Append(IDM_EDIT_PERSPECTIVES, _("Edit Perspectives"),
- _("Toggle editing of perspectives"), wxITEM_CHECK);
- pPerspectives->AppendSeparator();
- pPerspectives->Append(IDM_ADD_PERSPECTIVE, _("Create New Perspective"));
- pPerspectives->AppendSubMenu(Parent->m_SavedPerspectives, _("Saved Perspectives"));
- Parent->PopulateSavedPerspectives();
- pPerspectives->AppendSeparator();
- wxMenu* pAddPane = new wxMenu;
- pPerspectives->AppendSubMenu(pAddPane, _("Add New Pane To"));
- pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_TOP, _("Top"));
- pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_BOTTOM, _("Bottom"));
- pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_LEFT, _("Left"));
- pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_RIGHT, _("Right"));
- pAddPane->Append(IDM_PERSPECTIVES_ADD_PANE_CENTER, _("Center"));
- pPerspectives->Append(IDM_TAB_SPLIT, _("Tab Split"), "", wxITEM_CHECK);
- pPerspectives->Append(IDM_NO_DOCKING, _("Disable Docking"),
- "Disable docking of perspective panes to main window", wxITEM_CHECK);
-
- pMenuBar->Append(pDebugMenu, _("&Debug"));
-
- CreateMenuSymbols(pMenuBar);
-}
-
-void CCodeWindow::CreateMenuOptions(wxMenu* pMenu)
-{
- wxMenuItem* boottopause =
- pMenu->Append(IDM_BOOT_TO_PAUSE, _("Boot to Pause"),
- _("Start the game directly instead of booting to pause"), wxITEM_CHECK);
- boottopause->Check(bBootToPause);
-
- wxMenuItem* automaticstart = pMenu->Append(
- IDM_AUTOMATIC_START, _("&Automatic Start"),
- _("Automatically load the Default ISO when Dolphin starts, or the last game you loaded,"
- " if you have not given it an elf file with the --elf command line. [This can be"
- " convenient if you are bug-testing with a certain game and want to rebuild"
- " and retry it several times, either with changes to Dolphin or if you are"
- " developing a homebrew game.]"),
- wxITEM_CHECK);
- automaticstart->Check(bAutomaticStart);
-
- pMenu->Append(IDM_FONT_PICKER, _("&Font..."));
-}
-
// CPU Mode and JIT Menu
void CCodeWindow::OnCPUMode(wxCommandEvent& event)
{
@@ -572,10 +468,10 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
PowerPC::SetMode(UseInterpreter() ? PowerPC::MODE_INTERPRETER : PowerPC::MODE_JIT);
break;
case IDM_BOOT_TO_PAUSE:
- bBootToPause = !bBootToPause;
+ SConfig::GetInstance().bBootToPause = event.IsChecked();
return;
case IDM_AUTOMATIC_START:
- bAutomaticStart = !bAutomaticStart;
+ SConfig::GetInstance().bAutomaticStart = event.IsChecked();
return;
case IDM_JIT_OFF:
SConfig::GetInstance().bJITOff = event.IsChecked();