From 3bd3ba4fafb72ecea05d7644e02b1d735c8344ea Mon Sep 17 00:00:00 2001 From: "Avi Halachmi (:avih)" Date: Sat, 16 May 2015 23:27:06 +0300 Subject: [PATCH] gui: speedhacks: disable restore-defaults when Presets is used The Restore-Defaults button and the Presets checkbox are inherently conflicting since both of them apply (different) sets of values to the speed hacks, however the Preset also applies values to other panels. Now the relation between the Defaults button and Preset is consistent with other panels (EE/VU) where Defaults already got disabled when Presets is used. Before this patch (and also before the previous one which fixed the locking), clicking restore-defaults while Presets was checked resulted in incorrect state where Preset is checked but the speed hacks are both unlocked and also didn't necessarily match the selected preset. Now this can't happen. --- pcsx2/gui/Panels/SpeedhacksPanel.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pcsx2/gui/Panels/SpeedhacksPanel.cpp b/pcsx2/gui/Panels/SpeedhacksPanel.cpp index 0f6fc0b2b9..2526401242 100644 --- a/pcsx2/gui/Panels/SpeedhacksPanel.cpp +++ b/pcsx2/gui/Panels/SpeedhacksPanel.cpp @@ -248,8 +248,9 @@ void Panels::SpeedHacksPanel::EnableStuff( AppConfig* configToUse ) bool hacksEnabled = configToUse->EnableSpeedHacks; bool HacksEnabledAndNoPreset = hacksEnabled && !hasPreset; - // Main checkbox - locked only if presets are enabled + // Main checkbox and Restore-defaults - locked only if presets are enabled m_check_Enable->Enable(!hasPreset); + m_button_Defaults->Enable(!hasPreset); // lock/unlock the slider panels rather than the sliders themselves // in order to affect both sliders and texts