Fix CPU Clock Override checkbox not updating with GameINI - also bold it if it's overriden

This commit is contained in:
Silent 2019-06-23 22:34:40 +02:00
parent 5262f39026
commit 09aadf0e9c
No known key found for this signature in database
GPG Key ID: AE53149BB0C45AF1
1 changed files with 6 additions and 0 deletions

View File

@ -136,6 +136,12 @@ void AdvancedPane::Update()
const bool enable_cpu_clock_override_widgets = SConfig::GetInstance().m_OCEnable; const bool enable_cpu_clock_override_widgets = SConfig::GetInstance().m_OCEnable;
const bool enable_custom_rtc_widgets = SConfig::GetInstance().bEnableCustomRTC && !running; const bool enable_custom_rtc_widgets = SConfig::GetInstance().bEnableCustomRTC && !running;
QFont bf = font();
bf.setBold(Config::GetActiveLayerForConfig(Config::MAIN_OVERCLOCK_ENABLE) !=
Config::LayerType::Base);
m_cpu_clock_override_checkbox->setFont(bf);
m_cpu_clock_override_checkbox->setChecked(enable_cpu_clock_override_widgets);
m_cpu_clock_override_slider->setEnabled(enable_cpu_clock_override_widgets); m_cpu_clock_override_slider->setEnabled(enable_cpu_clock_override_widgets);
m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets); m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets);