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.
This commit is contained in:
master0fdisaster 2018-08-10 02:22:11 +02:00
parent 1544d7d681
commit 0d79e8a2ca
1 changed files with 1 additions and 1 deletions

View File

@ -139,7 +139,7 @@ void AdvancedPane::Update()
m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets); m_cpu_clock_override_slider_label->setEnabled(enable_cpu_clock_override_widgets);
m_cpu_clock_override_slider->setValue( m_cpu_clock_override_slider->setValue(
static_cast<int>(std::ceil(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f))); static_cast<int>(std::round(std::log2f(SConfig::GetInstance().m_OCFactor) * 25.f + 100.f)));
m_cpu_clock_override_slider_label->setText([] { m_cpu_clock_override_slider_label->setText([] {
int core_clock = SystemTimers::GetTicksPerSecond() / std::pow(10, 6); int core_clock = SystemTimers::GetTicksPerSecond() / std::pow(10, 6);