From 24bebf7f5987d8d1226019e01f5524df84de32db Mon Sep 17 00:00:00 2001 From: Connor McLaughlin Date: Sun, 16 Feb 2020 00:13:48 +0900 Subject: [PATCH] SDL: Add emulation speed slider --- src/duckstation-sdl/sdl_host_interface.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/duckstation-sdl/sdl_host_interface.cpp b/src/duckstation-sdl/sdl_host_interface.cpp index aa9f5bebe..dfb50d43f 100644 --- a/src/duckstation-sdl/sdl_host_interface.cpp +++ b/src/duckstation-sdl/sdl_host_interface.cpp @@ -1170,6 +1170,16 @@ void SDLHostInterface::DrawSettingsWindow() ImGui::NewLine(); if (DrawSettingsSectionHeader("Behavior")) { + ImGui::Text("Emulation Speed:"); + ImGui::SameLine(indent); + + if (ImGui::SliderFloat("##speed", &m_settings.emulation_speed, 0.25f, 5.0f)) + { + settings_changed = true; + if (m_system) + m_system->UpdateThrottlePeriod(); + } + if (ImGui::Checkbox("Enable Speed Limiter", &m_settings.speed_limiter_enabled)) { settings_changed = true;