Host: Get rid of Host_SetStartupDebuggingParameters()

This is something that should be the responsibility of the frontend
booting the game. Making this part of the host 'interface' inherently
requires frontends to leak internal details (much like the other
UI-related functions in the interface).

This also decouples more behavior from the debugger and the
initialization process in the wx frontend. This also eliminates several
usages of the parent menubar in the debugger code window.
This commit is contained in:
Lioncash 2017-05-14 16:49:25 -04:00
parent 651340826d
commit 7baabe99d1
9 changed files with 30 additions and 67 deletions

View file

@ -481,7 +481,7 @@ void CCodeWindow::OnCPUMode(wxCommandEvent& event)
switch (event.GetId())
{
case IDM_INTERPRETER:
PowerPC::SetMode(UseInterpreter() ? PowerPC::CoreMode::Interpreter : PowerPC::CoreMode::JIT);
PowerPC::SetMode(event.IsChecked() ? PowerPC::CoreMode::Interpreter : PowerPC::CoreMode::JIT);
break;
case IDM_BOOT_TO_PAUSE:
SConfig::GetInstance().bBootToPause = event.IsChecked();
@ -561,32 +561,6 @@ void CCodeWindow::OnJitMenu(wxCommandEvent& event)
}
}
// Shortcuts
bool CCodeWindow::UseInterpreter()
{
return GetParentMenuBar()->IsChecked(IDM_INTERPRETER);
}
bool CCodeWindow::BootToPause()
{
return GetParentMenuBar()->IsChecked(IDM_BOOT_TO_PAUSE);
}
bool CCodeWindow::AutomaticStart()
{
return GetParentMenuBar()->IsChecked(IDM_AUTOMATIC_START);
}
bool CCodeWindow::JITNoBlockCache()
{
return GetParentMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_CACHE);
}
bool CCodeWindow::JITNoBlockLinking()
{
return GetParentMenuBar()->IsChecked(IDM_JIT_NO_BLOCK_LINKING);
}
// Update GUI
void CCodeWindow::Repopulate(bool refresh_codeview)
{