From c1605591d12e0aace1305e8ef962fa320ca0e76e Mon Sep 17 00:00:00 2001 From: SuuperW Date: Fri, 4 Jul 2025 14:26:22 -0500 Subject: [PATCH] Pass test WorkWithFullUndoHistory. BeginNewBatch was not returning what it said it was. --- .../movie/tasproj/TasMovie.History.cs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index 8c0b662666..e0a77d7a9e 100644 --- a/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/src/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -140,7 +140,7 @@ namespace BizHawk.Client.Common if (ret) { - ret = AddMovieAction(name); + AddMovieAction(name); } _recordingBatch = true; @@ -268,17 +268,15 @@ namespace BizHawk.Client.Common } } - private bool AddMovieAction(string name) + private void AddMovieAction(string name) { if (UndoIndex + 1 != _history.Count) { TruncateLog(UndoIndex + 1); } if (name.Length is 0) name = $"Undo step {_totalSteps}"; - bool ret = false; if (!_recordingBatch) { - ret = true; _history.Add(new List(1)); Names.Add(name); _totalSteps += 1; @@ -291,11 +289,8 @@ namespace BizHawk.Client.Common { _history.RemoveAt(0); Names.RemoveAt(0); - ret = false; } } - - return ret; } // TODO: These probably aren't the best way to handle undo/redo.