Merge pull request #5427 from lioncash/host

Host: Get rid of Host_SetStartupDebuggingParameters()
This commit is contained in:
Mat M
2017-05-18 19:04:25 -04:00
committed by GitHub
9 changed files with 30 additions and 67 deletions

View File

@ -709,6 +709,8 @@ void CFrame::StartGame(const std::string& filename)
DoFullscreen(SConfig::GetInstance().bFullscreen);
SetDebuggerStartupParameters();
if (!BootManager::BootCore(filename))
{
DoFullscreen(false);
@ -747,6 +749,27 @@ void CFrame::StartGame(const std::string& filename)
}
}
void CFrame::SetDebuggerStartupParameters() const
{
SConfig& config = SConfig::GetInstance();
if (m_use_debugger)
{
const wxMenuBar* const menu_bar = GetMenuBar();
config.bBootToPause = menu_bar->IsChecked(IDM_BOOT_TO_PAUSE);
config.bAutomaticStart = menu_bar->IsChecked(IDM_AUTOMATIC_START);
config.bJITNoBlockCache = menu_bar->IsChecked(IDM_JIT_NO_BLOCK_CACHE);
config.bJITNoBlockLinking = menu_bar->IsChecked(IDM_JIT_NO_BLOCK_LINKING);
config.bEnableDebugging = true;
}
else
{
config.bBootToPause = false;
config.bEnableDebugging = false;
}
}
void CFrame::OnBootDrive(wxCommandEvent& event)
{
const auto* menu = static_cast<wxMenu*>(event.GetEventObject());