diff --git a/common/src/Utilities/pxRadioPanel.cpp b/common/src/Utilities/pxRadioPanel.cpp index 6f1f387a2f..a221391c86 100644 --- a/common/src/Utilities/pxRadioPanel.cpp +++ b/common/src/Utilities/pxRadioPanel.cpp @@ -149,6 +149,8 @@ void pxRadioPanel::_RealizeDefaultOption() } } +// Highlights (bold) the text of the default radio. +// Not intended for restoring default value at later time. pxRadioPanel& pxRadioPanel::SetDefaultItem( int idx ) { if( idx == m_DefaultIdx ) return *this; diff --git a/pcsx2/gui/Panels/CpuPanel.cpp b/pcsx2/gui/Panels/CpuPanel.cpp index 13ed7d9c28..3a82301a0a 100644 --- a/pcsx2/gui/Panels/CpuPanel.cpp +++ b/pcsx2/gui/Panels/CpuPanel.cpp @@ -74,8 +74,9 @@ void Panels::BaseAdvancedCpuOptions::OnRestoreDefaults(wxCommandEvent& evt) void Panels::BaseAdvancedCpuOptions::RestoreDefaults() { - m_RoundModePanel->SetSelection( 3 ); // Roundmode chop - m_ClampModePanel->SetSelection( 1 ); // clamp mode normal + AppConfig def; // created with default values + def.EnablePresets = false; // disable presets otherwise it'll disable some widgets + ApplyConfigToGui(def); } Panels::AdvancedOptionsFPU::AdvancedOptionsFPU( wxWindow* parent ) @@ -260,9 +261,9 @@ void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ) void Panels::CpuPanelEE::OnRestoreDefaults(wxCommandEvent &evt) { - m_panel_RecEE->SetSelection( m_panel_RecEE->GetButton(1)->IsEnabled() ? 1 : 0 ); - m_panel_RecIOP->SetSelection( m_panel_RecIOP->GetButton(1)->IsEnabled() ? 1 : 0 ); - m_check_EECacheEnable->SetValue(0); + AppConfig def; // created with default values + def.EnablePresets = false; // disable presets otherwise it'll disable some widgets + ApplyConfigToGui(def); if( BaseAdvancedCpuOptions* opts = (BaseAdvancedCpuOptions*)FindWindowByName(L"AdvancedOptionsFPU") ) opts->RestoreDefaults(); @@ -335,8 +336,9 @@ void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags ) void Panels::CpuPanelVU::OnRestoreDefaults(wxCommandEvent &evt) { - m_panel_VU0->SetSelection( m_panel_VU0->GetButton(1)->IsEnabled() ? 1 : 0 ); - m_panel_VU1->SetSelection( m_panel_VU1->GetButton(1)->IsEnabled() ? 1 : 0 ); + AppConfig def; // created with default values + def.EnablePresets = false; // disable presets otherwise it'll disable some widgets + ApplyConfigToGui(def); if( BaseAdvancedCpuOptions* opts = (BaseAdvancedCpuOptions*)FindWindowByName(L"AdvancedOptionsVU") ) opts->RestoreDefaults();