From db555f608717e20c6418791a137f0294212d4f80 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Thu, 29 May 2025 17:44:40 +0200 Subject: [PATCH] remove _playbackInterrupted bool in TAStudio Should fix the bug mentioned in #4184. See 1f6ead6354d8350d6e5c61788fa3c5cffa2bd383, #2324, #2371 and 98498f9d502111b76449e8956e85093cb6914640 for more confusion. This change might break any or all of the above. --- .../tools/TAStudio/TAStudio.ListView.cs | 4 ---- .../tools/TAStudio/TAStudio.Navigation.cs | 2 +- .../tools/TAStudio/TAStudio.cs | 13 ------------- 3 files changed, 1 insertion(+), 18 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs index fcb6681d5a..6d09877b73 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.ListView.cs @@ -28,7 +28,6 @@ namespace BizHawk.Client.EmuHawk private bool _suppressContextMenu; private int _startRow; private int _paintingMinFrame = -1; - private bool _playbackInterrupted; // Occurs when the emulator is unpaused and the user click and holds mouse down to begin delivering input // Editing analog input private string _axisEditColumn = ""; @@ -603,9 +602,6 @@ namespace BizHawk.Client.EmuHawk } else if (targetCol.Type is not ColumnType.Text) // User changed input { - _playbackInterrupted = !MainForm.EmulatorPaused; - MainForm.PauseEmulator(); - // Pausing the emulator is insufficient to actually stop frame advancing as the frame advance hotkey can // still take effect. This can lead to desyncs by simultaneously changing input and frame advancing. // So we want to block all frame advance operations while the user is changing input in the piano roll diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs index f78411fd26..56ada6ce1a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.Navigation.cs @@ -14,7 +14,7 @@ namespace BizHawk.Client.EmuHawk if (frame <= Emulator.Frame) { if ((MainForm.EmulatorPaused || !MainForm.IsSeeking) - && !CurrentTasMovie.LastPositionStable && !_playbackInterrupted) + && !CurrentTasMovie.LastPositionStable) { LastPositionFrame = Emulator.Frame; CurrentTasMovie.LastPositionStable = true; // until new frame is emulated diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index b0aed56635..fa45201b5a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -958,13 +958,6 @@ namespace BizHawk.Client.EmuHawk private void DoTriggeredAutoRestoreIfNeeded() { - // Disable the seek that could have been initiated when painting. - // This must done before DoAutoRestore, otherwise it would disable the auto-restore seek. - if (_playbackInterrupted) - { - MainForm.PauseOnFrame = null; - } - if (_triggerAutoRestore) { TastudioPlayMode(true); // once user started editing, rec mode is unsafe @@ -973,12 +966,6 @@ namespace BizHawk.Client.EmuHawk _triggerAutoRestore = false; _autoRestorePaused = null; } - - if (_playbackInterrupted) - { - MainForm.UnpauseEmulator(); - _playbackInterrupted = false; - } } public void InsertNumFrames(int insertionFrame, int numberOfFrames)