diff --git a/pcsx2/gui/AppConfig.cpp b/pcsx2/gui/AppConfig.cpp index ddf65394c0..a374bc50fa 100644 --- a/pcsx2/gui/AppConfig.cpp +++ b/pcsx2/gui/AppConfig.cpp @@ -869,8 +869,9 @@ bool AppConfig::IsOkApplyPreset(int n) //Console.WriteLn("Applying Preset %d ...", n); //Have some original and default values at hand to be used later. - Pcsx2Config::GSOptions original_GS = EmuOptions.GS; - AppConfig::FramerateOptions original_Framerate = Framerate; + Pcsx2Config::GSOptions original_GS = EmuOptions.GS; + AppConfig::FramerateOptions original_Framerate = Framerate; + Pcsx2Config::SpeedhackOptions original_SpeedHacks = EmuOptions.Speedhacks; AppConfig default_AppConfig; Pcsx2Config default_Pcsx2Config; @@ -880,7 +881,7 @@ bool AppConfig::IsOkApplyPreset(int n) // 2. The panels should not apply values which the presets don't control if the value is initiated by a preset. // Currently controlled by the presets: // - AppConfig: Framerate (except turbo/slowmo factors), EnableSpeedHacks, EnableGameFixes. - // - EmuOptions: Cpu, Gamefixes, SpeedHacks, EnablePatches, GS (except for FrameLimitEnable, VsyncEnable and ManagedVsync). + // - EmuOptions: Cpu, Gamefixes, SpeedHacks (except mtvu), EnablePatches, GS (except for FrameLimitEnable, VsyncEnable and ManagedVsync). // // This essentially currently covers all the options on all the panels except for framelimiter which isn't // controlled by the presets, and the entire GSWindow panel which also isn't controlled by presets @@ -908,7 +909,7 @@ bool AppConfig::IsOkApplyPreset(int n) EmuOptions.Gamefixes = default_Pcsx2Config.Gamefixes; EmuOptions.Speedhacks = default_Pcsx2Config.Speedhacks; EmuOptions.Speedhacks.bitset = 0; //Turn off individual hacks to make it visually clear they're not used. - + EmuOptions.Speedhacks.vuThread = original_SpeedHacks.vuThread; // MTVU is not modified by presets //Actual application of current preset over the base settings which all presets use (mostly pcsx2's default values). //The presets themselves might need some voodoo tuning to be even more useful. Currently they mostly modify Speedhacks. diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 0052b1a0de..6a4e1ccd5c 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -269,9 +269,7 @@ Panels::SpeedHacksPanel::SpeedHacksPanel( wxWindow* parent ) void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse ) { - //Console.WriteLn("SpeedHacksPanel::EnableStuff: Using %s", configToUse?"Object":"NULL"); if( !configToUse ) configToUse = g_Conf; - //Console.WriteLn("SpeedHacksPanel::EnableStuff: EnabledPresets: %s", configToUse->EnablePresets?"true":"false"); wxSizerItemList& items( s_table->GetChildren() ); wxSizerItemList::iterator it = items.begin(); @@ -279,7 +277,7 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse ) while( it != end ) { - (*it)->GetWindow()->Enable( m_check_Enable->GetValue() && !configToUse->EnablePresets); + (*it)->GetWindow()->Enable( m_check_Enable->GetValue()); ++it; } } @@ -295,19 +293,22 @@ void Panels::SpeedHacksPanel::ApplyConfigToGui( AppConfig& configToApply, int fl const bool enabled = configToApply.EnableSpeedHacks; Pcsx2Config::SpeedhackOptions& opts=configToApply.EmuOptions.Speedhacks; - m_check_Enable ->SetValue( !!enabled ); + m_check_Enable ->SetValue( !!enabled ).Enable(!configToApply.EnablePresets); m_slider_eecycle ->SetValue( opts.EECycleRate + 1 ); m_slider_vustealer ->SetValue( opts.VUCycleSteal ); + m_slider_eecycle->Enable(!configToApply.EnablePresets); + m_slider_vustealer->Enable(!configToApply.EnablePresets); SetEEcycleSliderMsg(); SetVUcycleSliderMsg(); - m_check_vuFlagHack ->SetValue(opts.vuFlagHack); - m_check_vuThread ->SetValue(opts.vuThread); - m_check_intc ->SetValue(opts.IntcStat); - m_check_waitloop ->SetValue(opts.WaitLoop); - m_check_fastCDVD ->SetValue(opts.fastCDVD); + m_check_vuFlagHack ->SetValue(opts.vuFlagHack).Enable(!configToApply.EnablePresets); + if( !(flags & AppConfig::APPLY_FLAG_FROM_PRESET) ) + m_check_vuThread ->SetValue(opts.vuThread); + m_check_intc ->SetValue(opts.IntcStat).Enable(!configToApply.EnablePresets); + m_check_waitloop ->SetValue(opts.WaitLoop).Enable(!configToApply.EnablePresets); + m_check_fastCDVD ->SetValue(opts.fastCDVD).Enable(!configToApply.EnablePresets); EnableStuff( &configToApply ); @@ -315,8 +316,6 @@ void Panels::SpeedHacksPanel::ApplyConfigToGui( AppConfig& configToApply, int fl Layout(); //Console.WriteLn("SpeedHacksPanel::ApplyConfigToGui: EnabledPresets: %s", configToApply.EnablePresets?"true":"false"); - - this->Enable(!configToApply.EnablePresets); }