From 327c45b4403201fef216ca7b812eb8801012b949 Mon Sep 17 00:00:00 2001 From: Suuper Date: Sat, 14 May 2016 13:46:15 -0500 Subject: [PATCH] Fixed issue #626. --- .../movie/tasproj/TasMovie.History.cs | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs b/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs index 2ddc1a639e..1562eac56e 100644 --- a/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs +++ b/BizHawk.Client.Common/movie/tasproj/TasMovie.History.cs @@ -354,14 +354,13 @@ namespace BizHawk.Client.Common movie.BindMarkersToInput = bindMarkers; if (redoLength != length) - movie.InsertEmptyFrame(movie.InputLogLength, length - redoLength); + movie.InsertEmptyFrame(FirstFrame, length - redoLength); + if (undoLength != length) + movie.RemoveFrames(FirstFrame, movie.InputLogLength - undoLength); for (int i = 0; i < undoLength; i++) movie.SetFrame(FirstFrame + i, oldLog[i]); - if (undoLength != length) - movie.RemoveFrames(FirstFrame + undoLength, movie.InputLogLength); - movie.ChangeLog.IsRecording = wasRecording; movie.BindMarkersToInput = bindMarkers; } @@ -373,14 +372,13 @@ namespace BizHawk.Client.Common movie.BindMarkersToInput = bindMarkers; if (undoLength != length) - movie.InsertEmptyFrame(movie.InputLogLength, length - undoLength); + movie.InsertEmptyFrame(FirstFrame, length - undoLength); + if (redoLength != length) + movie.RemoveFrames(FirstFrame, movie.InputLogLength - redoLength); for (int i = 0; i < redoLength; i++) movie.SetFrame(FirstFrame + i, newLog[i]); - if (redoLength != length) - movie.RemoveFrames(FirstFrame + redoLength, movie.InputLogLength); - movie.ChangeLog.IsRecording = wasRecording; movie.BindMarkersToInput = bindMarkers; }