From 14413d896f30176543dc124519b7fee2366a6a46 Mon Sep 17 00:00:00 2001 From: Briar <205427297+icy-briar@users.noreply.github.com> Date: Fri, 11 Apr 2025 23:49:01 +0200 Subject: [PATCH] Fix `FRAME_LIMIT` int not being reset on exit if the turbo hotkey is spammed --- .../citra_emu/features/hotkeys/HotkeyFunctions.kt | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/android/app/src/main/java/org/citra/citra_emu/features/hotkeys/HotkeyFunctions.kt b/src/android/app/src/main/java/org/citra/citra_emu/features/hotkeys/HotkeyFunctions.kt index b097c18fb..e529ccada 100644 --- a/src/android/app/src/main/java/org/citra/citra_emu/features/hotkeys/HotkeyFunctions.kt +++ b/src/android/app/src/main/java/org/citra/citra_emu/features/hotkeys/HotkeyFunctions.kt @@ -26,7 +26,6 @@ class HotkeyFunctions ( fun toggleTurboSpeed() { if (isTurboSpeedEnabled) { - normalSpeed = IntSetting.FRAME_LIMIT.int IntSetting.FRAME_LIMIT.int = IntSetting.TURBO_SPEED.int } else { IntSetting.FRAME_LIMIT.int = normalSpeed @@ -41,12 +40,10 @@ class HotkeyFunctions ( } fun resetTurboSpeed() { - if (isTurboSpeedEnabled) { - isTurboSpeedEnabled = false - IntSetting.FRAME_LIMIT.int = normalSpeed + isTurboSpeedEnabled = false + IntSetting.FRAME_LIMIT.int = normalSpeed - settings.saveSetting(IntSetting.FRAME_LIMIT, SettingsFile.FILE_NAME_CONFIG) - NativeLibrary.reloadSettings() - } + settings.saveSetting(IntSetting.FRAME_LIMIT, SettingsFile.FILE_NAME_CONFIG) + NativeLibrary.reloadSettings() } } \ No newline at end of file