Permalink
Browse files

Qt/AdvancedPane: Fix CPU clock slider not updating on emulation state…

… change
  • Loading branch information...
Techjar committed Jul 5, 2018
1 parent fd83937 commit cd8e3efb215f01179c64c1be0a497ecbc2d75af2
Showing with 3 additions and 2 deletions.
  1. +3 −2 Source/Core/DolphinQt2/Settings/AdvancedPane.cpp
@@ -104,8 +104,6 @@ void AdvancedPane::ConnectLayout()
Update();
});
m_cpu_clock_override_slider->setValue(
static_cast<int>(std::ceil(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f)));
connect(m_cpu_clock_override_slider, &QSlider::valueChanged, [this](int oc_factor) {
// Vaguely exponential scaling?
SConfig::GetInstance().m_OCFactor =
@@ -137,6 +135,9 @@ void AdvancedPane::Update()
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->setValue(
static_cast<int>(std::ceil(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f)));
m_cpu_clock_override_slider_label->setText([] {
int core_clock = SystemTimers::GetTicksPerSecond() / std::pow(10, 6);
int percent = static_cast<int>(std::round(SConfig::GetInstance().m_OCFactor * 100.f));

0 comments on commit cd8e3ef

Please sign in to comment.