mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -707,6 +707,8 @@ void CFrame::StartGame(const std::string& filename)
|
||||
|
||||
DoFullscreen(SConfig::GetInstance().bFullscreen);
|
||||
|
||||
SetDebuggerStartupParameters();
|
||||
|
||||
if (!BootManager::BootCore(filename))
|
||||
{
|
||||
DoFullscreen(false);
|
||||
@ -745,6 +747,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());
|
||||
|
Reference in New Issue
Block a user