From 12ea262de95ddebb4be572205458b0b55e41ea0d Mon Sep 17 00:00:00 2001 From: adelikat Date: Sun, 16 Sep 2012 14:57:57 +0000 Subject: [PATCH] Movies - if in read+write mode and loading a post-movie savestate, the movie will now correctly go into movie finished mode, rather than stay in recording mode and cause desyncs --- BizHawk.MultiClient/movie/Movie.cs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/BizHawk.MultiClient/movie/Movie.cs b/BizHawk.MultiClient/movie/Movie.cs index 49cf02ee90..428712d3a6 100644 --- a/BizHawk.MultiClient/movie/Movie.cs +++ b/BizHawk.MultiClient/movie/Movie.cs @@ -547,10 +547,6 @@ namespace BizHawk.MultiClient while (true) { string line = reader.ReadLine(); - if (line.Contains(".[NES")) //TODO: Remove debug - { - MessageBox.Show("OOPS! Corrupted file stream"); - } if (line == null) break; else if (line.Trim() == "") continue; else if (line == "[Input]") continue; @@ -619,6 +615,12 @@ namespace BizHawk.MultiClient Log.TruncateStates(stateFrame); Log.TruncateMovie(stateFrame); } + else if (stateFrame > Log.Length) //Post movie savestate + { + Log.TruncateStates(Log.Length); + Log.TruncateMovie(Log.Length); + Mode = MOVIEMODE.FINISHED; + } Rerecords++; reader.Close(); }