diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 47cf4738c9..a9e2130e39 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -2501,6 +2501,7 @@ namespace BizHawk.Client.EmuHawk runFrame = true; } + bool isRewinding = false; if (Global.Rewinder.RewindActive && (Global.ClientControls["Rewind"] || PressRewind) && !Global.MovieSession.Movie.IsRecording) // Rewind isn't "bulletproof" and can desync a recoridng movie! { @@ -2508,6 +2509,7 @@ namespace BizHawk.Client.EmuHawk suppressCaptureRewind = true; runFrame = Global.Rewinder.Count != 0; + isRewinding = true; } if (UpdateFrame) @@ -2556,7 +2558,18 @@ namespace BizHawk.Client.EmuHawk if (updateFpsString) { var fps_string = _runloopLastFps + " fps"; - if (isTurboing) + if (isRewinding) + { + if (isTurboing || isFastForwarding) + { + fps_string += " <<<<"; + } + else + { + fps_string += " <<"; + } + } + else if (isTurboing) { fps_string += " >>>>"; } @@ -3258,6 +3271,20 @@ namespace BizHawk.Client.EmuHawk MovieImport.ProcessMovieImport(fn, ShowConversionError, GlobalWin.OSD.AddMessage); } + public void EnableRewind(bool enabled) + { + if (enabled) + { + Global.Rewinder.RewindActive = true; + GlobalWin.OSD.AddMessage("Rewind enabled"); + } + else + { + Global.Rewinder.RewindActive = false; + GlobalWin.OSD.AddMessage("Rewind suspended"); + } + } + #endregion private void GBcoreSettingsToolStripMenuItem_Click(object sender, EventArgs e) diff --git a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs index 86a4c6c09b..253532a2b5 100644 --- a/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs +++ b/BizHawk.Client.EmuHawk/tools/Lua/Libraries/EmuLuaLibrary.Client.cs @@ -49,18 +49,9 @@ namespace BizHawk.Client.EmuHawk "enablerewind", "Sets whether or not the rewind feature is enabled" )] - public static void EnableRewind(bool enabled) + public void EnableRewind(bool enabled) { - if (enabled) - { - Global.Rewinder.RewindActive = true; - GlobalWin.OSD.AddMessage("Rewind enabled"); - } - else - { - Global.Rewinder.RewindActive = false; - GlobalWin.OSD.AddMessage("Rewind suspended"); - } + GlobalWin.MainForm.EnableRewind(enabled); } [LuaMethodAttributes( diff --git a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 68cd337e53..3c23c200ad 100644 --- a/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -21,6 +21,7 @@ namespace BizHawk.Client.EmuHawk private int _defaultWidth; private int _defaultHeight; private TasMovie _tas; + private bool _originalRewindStatus; // The client rewind status before TAStudio was engaged (used to restore when disengaged) private Dictionary GenerateColumnNames() { @@ -108,6 +109,8 @@ namespace BizHawk.Client.EmuHawk GlobalWin.OSD.AddMessage("TAStudio engaged"); _tas = Global.MovieSession.Movie as TasMovie; GlobalWin.MainForm.RelinquishControl(this); + _originalRewindStatus = Global.Rewinder.RewindActive; + GlobalWin.MainForm.EnableRewind(false); } private void DisengageTastudio() @@ -115,6 +118,7 @@ namespace BizHawk.Client.EmuHawk GlobalWin.OSD.AddMessage("TAStudio disengaged"); Global.MovieSession.Movie = MovieService.DefaultInstance; GlobalWin.MainForm.TakeControl(); + GlobalWin.MainForm.EnableRewind(_originalRewindStatus); } private void NewTasMovie()