Presets GUI consistency fix: Speedhacks 'Restore Defaults' resulted in grayed-out controls if last applied settings include presets enabled.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4184 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
avihal@gmail.com 2011-01-09 00:12:38 +00:00
parent 0042843525
commit 61b5194ccd
1 changed files with 2 additions and 0 deletions

View File

@ -360,8 +360,10 @@ void Panels::SpeedHacksPanel::OnEnable_Toggled( wxCommandEvent& evt )
void Panels::SpeedHacksPanel::Defaults_Click( wxCommandEvent& evt ) void Panels::SpeedHacksPanel::Defaults_Click( wxCommandEvent& evt )
{ {
//Can only get here presets are disabled at the GUI (= the 'Defaults' button is enabled).
AppConfig currentConfigWithHacksReset = *g_Conf; AppConfig currentConfigWithHacksReset = *g_Conf;
currentConfigWithHacksReset.EmuOptions.Speedhacks = Pcsx2Config::SpeedhackOptions(); currentConfigWithHacksReset.EmuOptions.Speedhacks = Pcsx2Config::SpeedhackOptions();
currentConfigWithHacksReset.EnablePresets=false;//speed hacks gui depends on preset, apply it as if presets are disabled
ApplyConfigToGui( currentConfigWithHacksReset ); ApplyConfigToGui( currentConfigWithHacksReset );
evt.Skip(); evt.Skip();
} }