From 5bfc82a51763c15756a8a151feb02dd665318530 Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Wed, 30 Sep 2020 23:09:49 +1000 Subject: [PATCH] SDL: Add CPU clock control options --- src/duckstation-sdl/sdl_host_interface.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index d1c306177..758a92acc 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -1311,9 +1311,25 @@ void SDLHostInterface::DrawSettingsWindow() settings_changed = true; } + settings_changed |= ImGui::Checkbox("Enable CPU Clock Control", &m_settings_copy.cpu_overclock_enable); + if (m_settings_copy.cpu_overclock_enable) + { + ImGui::Text("Overclock:"); + ImGui::SameLine(indent); + + int overclock_percent = static_cast(m_settings_copy.GetCPUOverclockPercent()); + if (ImGui::SliderInt("##overclock_percent", &overclock_percent, 1, 1000, "%d%%")) + { + m_settings_copy.SetCPUOverclockPercent(static_cast(overclock_percent)); + settings_changed = true; + } + } + settings_changed |= ImGui::Checkbox("Enable Recompiler Memory Exceptions", &m_settings_copy.cpu_recompiler_memory_exceptions); + settings_changed |= ImGui::Checkbox("Enable Recompiler ICache", &m_settings_copy.cpu_recompiler_icache); + ImGui::EndTabItem(); } @@ -1432,7 +1448,8 @@ void SDLHostInterface::DrawSettingsWindow() settings_changed |= ImGui::Checkbox("Disable Interlacing", &m_settings_copy.gpu_disable_interlacing); settings_changed |= ImGui::Checkbox("Force NTSC Timings", &m_settings_copy.gpu_force_ntsc_timings); settings_changed |= ImGui::Checkbox("Widescreen Hack", &m_settings_copy.gpu_widescreen_hack); - settings_changed |= ImGui::Checkbox("Force 4:3 For 24-Bit Display", &m_settings_copy.display_force_4_3_for_24bit); + settings_changed |= + ImGui::Checkbox("Force 4:3 For 24-Bit Display", &m_settings_copy.display_force_4_3_for_24bit); settings_changed |= ImGui::Checkbox("PGXP Enabled", &m_settings_copy.gpu_pgxp_enable); settings_changed |= ImGui::Checkbox("PGXP Culling", &m_settings_copy.gpu_pgxp_culling);