From e1febf7ec114c45f6b247e3ae2d59b63355e7681 Mon Sep 17 00:00:00 2001 From: Akash Date: Mon, 22 Feb 2016 00:19:58 +0530 Subject: [PATCH] EE/VU Panel: Remove unnecessary code Removed some unneeded explicit calls of the enable function and also corrected the placement of braces on a function. ( do note that only the specific function at the file used a different placement of the braces) Also fix the grayout behavior of SuperVU recompiler option when DISABLE_SVU is defined. (thanks to turtleli) --- pcsx2/gui/Panels/CpuPanel.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/pcsx2/gui/Panels/CpuPanel.cpp b/pcsx2/gui/Panels/CpuPanel.cpp index a09a878070..7835515096 100644 --- a/pcsx2/gui/Panels/CpuPanel.cpp +++ b/pcsx2/gui/Panels/CpuPanel.cpp @@ -242,9 +242,8 @@ void Panels::CpuPanelEE::AppStatusEvent_OnSettingsApplied() ApplyConfigToGui( *g_Conf ); } -void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ){ - m_panel_RecEE->Enable(true); - +void Panels::CpuPanelEE::ApplyConfigToGui( AppConfig& configToApply, int flags ) +{ const Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler ); m_panel_RecEE->SetSelection( (int)recOps.EnableEE ); m_panel_RecIOP->SetSelection( (int)recOps.EnableIOP ); @@ -295,17 +294,10 @@ void Panels::CpuPanelVU::AppStatusEvent_OnSettingsApplied() void Panels::CpuPanelVU::ApplyConfigToGui( AppConfig& configToApply, int flags ) { - m_panel_VU0->Enable(true); - m_panel_VU1->Enable(true); - m_panel_VU0->EnableItem( 1, true); -#ifndef DISABLE_SVU - m_panel_VU0->EnableItem( 2, true); -#endif - - m_panel_VU1->EnableItem( 1, true); -#ifndef DISABLE_SVU - m_panel_VU1->EnableItem( 2, true); +#ifdef DISABLE_SVU + m_panel_VU0->EnableItem( 2, false); + m_panel_VU1->EnableItem( 2, false); #endif Pcsx2Config::RecompilerOptions& recOps( configToApply.EmuOptions.Cpu.Recompiler );