Permalink
Browse files

Merge pull request #7217 from Techjar/qt-clock-speed-slider

Qt/AdvancedPane: Fix CPU clock slider not updating on emulation state change
  • Loading branch information...
spycrab committed Jul 5, 2018
2 parents 233787e + cd8e3ef commit fbf445154b7398ae16ca294b7f0c6a34305a0ddd
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 fbf4451

Please sign in to comment.