diff --git a/BizHawk.MultiClient/MainForm.Movie.cs b/BizHawk.MultiClient/MainForm.Movie.cs index 01acef0be0..63e9527f23 100644 --- a/BizHawk.MultiClient/MainForm.Movie.cs +++ b/BizHawk.MultiClient/MainForm.Movie.cs @@ -166,35 +166,31 @@ namespace BizHawk.MultiClient { if (ReadOnly) { - //if (Global.Emulator.Frame > Global.MovieSession.Movie.Length()) - //{ - //Post movie savestate - //There is no movie data to load, and the movie will stay in movie finished mode - //So do nothing - //} - //else { if (!Global.MovieSession.Movie.CheckTimeLines(path, false)) return false; //Timeline/GUID error - Global.MovieSession.Movie.StartPlayback(); - SetMainformMovieInfo(); + if (Global.MovieSession.Movie.Mode == MOVIEMODE.FINISHED) + Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter); + else + { + Global.MovieSession.Movie.StartPlayback(); + SetMainformMovieInfo(); + } } } else { - //if (Global.Emulator.Frame > Global.MovieSession.Movie.Length()) //TODO: we haven't changed the emulator frame so this doesn't make sense! - //{ - //Post movie savestate - //There is no movie data to load, and the movie will stay in movie finished mode - //So do nothing - //} - //else { if (!Global.MovieSession.Movie.CheckTimeLines(path, true)) return false; //GUID Error - Global.MovieSession.Movie.StartNewRecording(); - SetMainformMovieInfo(); - Global.MovieSession.Movie.LoadLogFromSavestateText(path); + if (Global.MovieSession.Movie.Mode == MOVIEMODE.FINISHED) + Global.MovieSession.LatchInputFromPlayer(Global.MovieInputSourceAdapter); + else + { + Global.MovieSession.Movie.StartNewRecording(); + SetMainformMovieInfo(); + Global.MovieSession.Movie.LoadLogFromSavestateText(path); + } } } } diff --git a/BizHawk.MultiClient/movie/Movie.cs b/BizHawk.MultiClient/movie/Movie.cs index 5a299dc47a..33369c9c51 100644 --- a/BizHawk.MultiClient/movie/Movie.cs +++ b/BizHawk.MultiClient/movie/Movie.cs @@ -610,7 +610,19 @@ namespace BizHawk.MultiClient return true; } - if (stateFrame == 0 || stateFrame > l.Length()) + if (stateFrame > l.Length()) //stateFrame is greater than state input log, so movie finished mode + { + if (Mode == MOVIEMODE.PLAY || Mode == MOVIEMODE.FINISHED) + { + Mode = MOVIEMODE.FINISHED; + return true; + } + else + return false; //For now throw an error if recording, ideally what should happen is that the state gets loaded, and the movie set to movie finished, the movie at its current state is preserved and the state is loaded just fine. This should probably also only happen if checktimelines passes + } + + + if (stateFrame == 0) { stateFrame = l.Length(); //In case the frame count failed to parse, revert to using the entire state input log }