From 0d79e8a2ca18b2177c2cb853a32279e532089775 Mon Sep 17 00:00:00 2001 From: master0fdisaster <38867833+master0fdisaster@users.noreply.github.com> Date: Fri, 10 Aug 2018 02:22:11 +0200 Subject: [PATCH] Qt: Config/Advanced: Fix CPU Clock Speed Slider Changes rounding from ceiling to nearest, when updating the slider value. Using ceiling as rounding made some values inaccessible. --- Source/Core/DolphinQt/Settings/AdvancedPane.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp index 3e70e385d7..1e9ceeec87 100644 --- a/Source/Core/DolphinQt/Settings/AdvancedPane.cpp +++ b/Source/Core/DolphinQt/Settings/AdvancedPane.cpp @@ -139,7 +139,7 @@ void AdvancedPane::Update() m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets); m_cpu_clock_override_slider->setValue( - static_cast(std::ceil(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f))); + static_cast(std::round(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);