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

This commit is contained in:
adelikat 2012-09-16 14:57:57 +00:00
parent 2810a048f0
commit 12ea262de9
1 changed files with 6 additions and 4 deletions

View File

@ -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();
}