DolphinQt: Fix decrease emulation speed hotkey rollover

This commit is contained in:
sowens99 2023-09-27 21:40:16 -04:00
parent 467c7435d1
commit eac318a1d8
1 changed files with 5 additions and 2 deletions

View File

@ -470,8 +470,11 @@ void HotkeyScheduler::Run()
if (IsHotkey(HK_DECREASE_EMULATION_SPEED))
{
auto speed = Config::Get(Config::MAIN_EMULATION_SPEED) - 0.1;
speed = (speed <= 0 || (speed >= 0.95 && speed <= 1.05)) ? 1.0 : speed;
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
if (speed > 0)
{
speed = (speed >= 0.95 && speed <= 1.05) ? 1.0 : speed;
Config::SetCurrent(Config::MAIN_EMULATION_SPEED, speed);
}
ShowEmulationSpeed();
}