From bb0bd415a660f8311080ca9ea401a0774b7a437f Mon Sep 17 00:00:00 2001 From: feos Date: Sat, 28 Oct 2023 12:20:22 +0300 Subject: [PATCH] address #3500 --- src/BizHawk.Client.EmuHawk/tools/TAStudio/PlaybackBox.cs | 2 +- .../tools/TAStudio/TAStudio.IControlMainForm.cs | 9 +-------- src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs | 6 ++++++ 3 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/PlaybackBox.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/PlaybackBox.cs index b5c2f4f30b..1a92e5633a 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/PlaybackBox.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/PlaybackBox.cs @@ -127,7 +127,7 @@ namespace BizHawk.Client.EmuHawk private void RecordingModeCheckbox_MouseClick(object sender, MouseEventArgs e) { RecordingMode ^= true; - Tastudio.WasRecording = RecordingMode; // hard reset at manual click + Tastudio.WasRecording = RecordingMode; // hard reset at manual click and hotkey } private void RewindButton_MouseDown(object sender, MouseEventArgs e) diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs index a3d0582d50..cd2f790fa3 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.IControlMainForm.cs @@ -54,14 +54,7 @@ namespace BizHawk.Client.EmuHawk public void ToggleReadOnly() { - if (CurrentTasMovie.IsPlayingOrFinished()) - { - TastudioRecordMode(); - } - else if (CurrentTasMovie.IsRecording()) - { - TastudioPlayMode(); - } + TastudioToggleReadOnly(); } public bool WantsToControlStopMovie { get; private set; } diff --git a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs index 1463aaab5d..ad83a15c82 100644 --- a/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs +++ b/src/BizHawk.Client.EmuHawk/tools/TAStudio/TAStudio.cs @@ -712,6 +712,12 @@ namespace BizHawk.Client.EmuHawk TasPlaybackBox.RecordingMode = false; } + private void TastudioToggleReadOnly() + { + TasPlaybackBox.RecordingMode ^= true; + WasRecording = TasPlaybackBox.RecordingMode; // hard reset at manual click and hotkey + } + private void TastudioRecordMode() { TasPlaybackBox.RecordingMode = true;