From d3f87dc3579407fbdcf595150bc344e20893709e Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sat, 17 Oct 2020 16:49:09 +1000 Subject: [PATCH] SDL: Fix CPU clock control in menu not applying --- src/duckstation-sdl/sdl_host_interface.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index 5b0b0a637..5ad89c883 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -863,7 +863,11 @@ void SDLHostInterface::DrawQuickSettingsMenu() ImGui::EndMenu(); } - settings_changed |= ImGui::MenuItem("CPU Clock Control", nullptr, &m_settings_copy.cpu_overclock_enable); + if (ImGui::MenuItem("CPU Clock Control", nullptr, &m_settings_copy.cpu_overclock_enable)) + { + settings_changed = true; + m_settings_copy.UpdateOverclockActive(); + } if (ImGui::BeginMenu("CPU Clock Speed")) { @@ -874,7 +878,8 @@ void SDLHostInterface::DrawQuickSettingsMenu() { if (ImGui::MenuItem(TinyString::FromFormat("%u%%", value), nullptr, percent == value)) { - m_settings_copy.SetCPUOverclockPercent(percent); + m_settings_copy.SetCPUOverclockPercent(value); + m_settings_copy.UpdateOverclockActive(); settings_changed = true; } }