@@ -1149,9 +1149,11 @@ private void OnPauseToggle(bool newPauseState)
11491149 /// <item><description><see cref="ClientLuaLibrary.InvisibleEmulation(bool)"/></description></item>
11501150 /// </list>
11511151 /// </summary>
1152- public bool InvisibleEmulateNextFrame { get ; set ; }
1152+ public bool InvisibleEmulation { get => _invisibleUpdate ; set => _invisibleEmulateNextFrame = value ; }
11531153
1154+ private bool _invisibleEmulateNextFrame ;
11541155 private bool _invisibleEmulation ;
1156+ private bool _invisibleUpdate ;
11551157
11561158 private long MouseWheelTracker ;
11571159
@@ -1176,7 +1178,7 @@ private void OnPauseToggle(bool newPauseState)
11761178
11771179 public bool IsSeeking => PauseOnFrame . HasValue ;
11781180 private bool IsTurboSeeking => PauseOnFrame . HasValue && Config . TurboSeek ;
1179- public bool IsTurboing => InputManager . ClientControls [ "Turbo" ] || IsTurboSeeking || _invisibleEmulation ;
1181+ public bool IsTurboing => InputManager . ClientControls [ "Turbo" ] || IsTurboSeeking || _invisibleUpdate ;
11801182 public bool IsFastForwarding => InputManager . ClientControls [ "Fast Forward" ] || IsTurboing ;
11811183 public bool IsRewinding { get ; private set ; }
11821184
@@ -3000,7 +3002,7 @@ private void StepRunLoop_Core(bool force = false)
30003002 // BlockFrameAdvance (true when input it being editted in TAStudio) supercedes all other frame advance conditions
30013003 if ( ( runFrame || force ) && ! BlockFrameAdvance )
30023004 {
3003- _invisibleEmulation = InvisibleEmulateNextFrame ;
3005+ _invisibleEmulation = _invisibleEmulateNextFrame ;
30043006
30053007 var isFastForwarding = IsFastForwarding ;
30063008 var isFastForwardingOrRewinding = isFastForwarding || isRewinding || Config . Unthrottled ;
@@ -3066,7 +3068,7 @@ private void StepRunLoop_Core(bool force = false)
30663068
30673069 RA ? . OnFrameAdvance ( ) ;
30683070
3069- if ( Config . AutosaveSaveRAM )
3071+ if ( Config . AutosaveSaveRAM && ! _invisibleEmulation )
30703072 {
30713073 AutoFlushSaveRamIn -- ;
30723074 if ( AutoFlushSaveRamIn <= 0 )
@@ -3087,7 +3089,7 @@ private void StepRunLoop_Core(bool force = false)
30873089 bool render = ! _invisibleEmulation && ( ! _throttle . skipNextFrame || _currAviWriter ? . UsesVideo is true || atTurboSeekEnd ) ;
30883090 bool newFrame = Emulator . FrameAdvance ( InputManager . ControllerOutput , render , renderSound ) ;
30893091
3090- MovieSession . HandleFrameAfter ( ToolBypassingMovieEndAction is not null ) ;
3092+ if ( ! _invisibleUpdate ) MovieSession . HandleFrameAfter ( ToolBypassingMovieEndAction is not null ) ;
30913093
30923094 if ( returnToRecording )
30933095 {
@@ -3124,6 +3126,7 @@ private void StepRunLoop_Core(bool force = false)
31243126 UpdateToolsAfter ( ) ;
31253127 }
31263128 }
3129+ _invisibleUpdate = _invisibleEmulation ;
31273130
31283131 if ( ! PauseAvi && newFrame && ! _invisibleEmulation )
31293132 {
@@ -4411,6 +4414,8 @@ private bool Rewind(ref bool runFrame, long currentTimestamp, out bool returnToR
44114414
44124415 returnToRecording = false ;
44134416
4417+ if ( _invisibleEmulation ) return false ;
4418+
44144419 if ( ToolControllingRewind is { } rewindTool )
44154420 {
44164421 if ( InputManager . ClientControls [ "Rewind" ] || PressRewind )
0 commit comments