Skip to content

Commit 27e94d9

Browse files
committed
Fix turbo logic for invisible emulation.
1 parent 246d4bd commit 27e94d9

File tree

4 files changed

+5
-8
lines changed

4 files changed

+5
-8
lines changed

src/BizHawk.Client.Common/lua/CommonLibs/ClientLuaLibrary.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ public string GetLuaEngine()
9595
=> "NLua+Lua";
9696

9797
[LuaMethodExample("client.invisibleemulation( true );")]
98-
[LuaMethod("invisibleemulation", "Disables and enables emulator updates")]
98+
[LuaMethod("invisibleemulation", "Enters/exits turbo mode and disables/enables most emulator updates.")]
9999
public void InvisibleEmulation(bool invisible)
100100
=> APIs.EmuClient.InvisibleEmulation(invisible);
101101

src/BizHawk.Client.EmuHawk/MainForm.cs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1101,7 +1101,6 @@ private set
11011101
public bool FrameInch { get; set; }
11021102
public bool HoldFrameAdvance { get; set; } // necessary for tastudio > button
11031103
public bool PressRewind { get; set; } // necessary for tastudio < button
1104-
public bool FastForward { get; set; }
11051104

11061105
/// <summary>
11071106
/// Disables updates for video/audio, and enters "turbo" mode.
@@ -1147,8 +1146,8 @@ private set
11471146

11481147
public bool IsSeeking => PauseOnFrame.HasValue;
11491148
private bool IsTurboSeeking => PauseOnFrame.HasValue && Config.TurboSeek;
1150-
public bool IsTurboing => InputManager.ClientControls["Turbo"] || IsTurboSeeking;
1151-
public bool IsFastForwarding => InputManager.ClientControls["Fast Forward"] || IsTurboing || InvisibleEmulation;
1149+
public bool IsTurboing => InputManager.ClientControls["Turbo"] || IsTurboSeeking || InvisibleEmulation;
1150+
public bool IsFastForwarding => InputManager.ClientControls["Fast Forward"] || IsTurboing;
11521151
public bool IsRewinding { get; private set; }
11531152

11541153
/// <summary>
@@ -2177,7 +2176,7 @@ private void SyncThrottle()
21772176
// method is selected, but the clock throttle determines that by itself and
21782177
// everything appears normal here.
21792178
var rewind = Rewinder?.Active == true && (InputManager.ClientControls["Rewind"] || PressRewind);
2180-
var fastForward = InputManager.ClientControls["Fast Forward"] || FastForward;
2179+
var fastForward = IsFastForwarding;
21812180
var turbo = IsTurboing;
21822181

21832182
int speedPercent = fastForward ? Config.SpeedPercentAlternate : Config.SpeedPercent;

src/BizHawk.Client.EmuHawk/RetroAchievements/IMainFormForRetroAchievements.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ public interface IMainFormForRetroAchievements : IMainFormForTools
99

1010
bool FrameInch { get; set; }
1111

12-
bool FastForward { get; }
13-
1412
GameInfo Game { get; }
1513

1614
IMovieSession MovieSession { get; }

src/BizHawk.Client.EmuHawk/RetroAchievements/RetroAchievements.Hardcore.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ protected void CheckHardcoreModeConditions()
9191
_inputManager.ClientControls.Overrides(_hardcoreHotkeyOverrides);
9292
_mainForm.FrameInch = false;
9393

94-
var fastForward = _inputManager.ClientControls["Fast Forward"] || _mainForm.FastForward;
94+
var fastForward = _mainForm.IsFastForwarding;
9595
var speedPercent = fastForward ? _getConfig().SpeedPercentAlternate : _getConfig().SpeedPercent;
9696
if (speedPercent < 100)
9797
{

0 commit comments

Comments
 (0)