mirror of
https://github.com/azahar-emu/azahar.git
synced 2025-04-28 13:47:59 +03:00
Fix FRAME_LIMIT
int not being reset on exit if the turbo hotkey is spammed
This commit is contained in:
parent
bf4eef8e58
commit
14413d896f
1 changed files with 4 additions and 7 deletions
|
@ -26,7 +26,6 @@ class HotkeyFunctions (
|
||||||
|
|
||||||
fun toggleTurboSpeed() {
|
fun toggleTurboSpeed() {
|
||||||
if (isTurboSpeedEnabled) {
|
if (isTurboSpeedEnabled) {
|
||||||
normalSpeed = IntSetting.FRAME_LIMIT.int
|
|
||||||
IntSetting.FRAME_LIMIT.int = IntSetting.TURBO_SPEED.int
|
IntSetting.FRAME_LIMIT.int = IntSetting.TURBO_SPEED.int
|
||||||
} else {
|
} else {
|
||||||
IntSetting.FRAME_LIMIT.int = normalSpeed
|
IntSetting.FRAME_LIMIT.int = normalSpeed
|
||||||
|
@ -41,12 +40,10 @@ class HotkeyFunctions (
|
||||||
}
|
}
|
||||||
|
|
||||||
fun resetTurboSpeed() {
|
fun resetTurboSpeed() {
|
||||||
if (isTurboSpeedEnabled) {
|
isTurboSpeedEnabled = false
|
||||||
isTurboSpeedEnabled = false
|
IntSetting.FRAME_LIMIT.int = normalSpeed
|
||||||
IntSetting.FRAME_LIMIT.int = normalSpeed
|
|
||||||
|
|
||||||
settings.saveSetting(IntSetting.FRAME_LIMIT, SettingsFile.FILE_NAME_CONFIG)
|
settings.saveSetting(IntSetting.FRAME_LIMIT, SettingsFile.FILE_NAME_CONFIG)
|
||||||
NativeLibrary.reloadSettings()
|
NativeLibrary.reloadSettings()
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue