mirror of
https://github.com/EmulatorJS/EmulatorJS.git
synced 2024-09-20 02:46:23 +00:00
Fix changing ff-ratio while ff is active
This commit is contained in:
parent
81a6b94f4f
commit
4a0b1a942b
2 changed files with 5 additions and 1 deletions
|
@ -3156,11 +3156,15 @@ class EmulatorJS {
|
|||
} else if (option === "virtual-gamepad-left-handed-mode") {
|
||||
this.toggleVirtualGamepadLeftHanded(value !== "disabled");
|
||||
} else if (option === "ff-ratio") {
|
||||
if (this.isFastForward) this.gameManager.toggleFastForward(0);
|
||||
if (value === "unlimited") {
|
||||
this.gameManager.setFastForwardRatio(0);
|
||||
} else if (!isNaN(value)) {
|
||||
this.gameManager.setFastForwardRatio(parseFloat(value));
|
||||
}
|
||||
setTimeout(() => {
|
||||
if (this.isFastForward) this.gameManager.toggleFastForward(1);
|
||||
}, 10)
|
||||
} else if (option === "fastForward") {
|
||||
if (value === "enabled") {
|
||||
this.isFastForward = true;
|
||||
|
|
2
data/emulator.min.js
vendored
2
data/emulator.min.js
vendored
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue