From d4a48a8ee1cd9bc5a08b236c5afce6f0a57bf54c Mon Sep 17 00:00:00 2001 From: zeromus Date: Mon, 10 Sep 2018 16:56:55 -0400 Subject: [PATCH] here's how I think input display should work. also fixes your bug. also breaks something that had this comment (maybe) // adelikat: TODO: this is likely the source of frame 0 TAStudio bugs, I think the intent is to check if the movie is 0 length? --- BizHawk.Client.Common/movie/MovieSession.cs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/BizHawk.Client.Common/movie/MovieSession.cs b/BizHawk.Client.Common/movie/MovieSession.cs index 1a4a5940e7..ad20584dfa 100644 --- a/BizHawk.Client.Common/movie/MovieSession.cs +++ b/BizHawk.Client.Common/movie/MovieSession.cs @@ -133,10 +133,10 @@ namespace BizHawk.Client.Common var input = Movie.GetInputState(Global.Emulator.Frame); // adelikat: TODO: this is likely the source of frame 0 TAStudio bugs, I think the intent is to check if the movie is 0 length? - if (Global.Emulator.Frame == 0) // Hacky - { - HandleMovieAfterFrameLoop(); // Frame 0 needs to be handled. - } + //if (Global.Emulator.Frame == 0) // Hacky + //{ + // HandleMovieAfterFrameLoop(); // Frame 0 needs to be handled. + //} if (input == null) { @@ -327,6 +327,10 @@ namespace BizHawk.Client.Common { HandlePlaybackEnd(); } + else if (Movie.IsPlaying && !Movie.IsFinished) + { + LatchInputFromLog(); + } } public bool HandleMovieLoadState(string path) @@ -456,6 +460,7 @@ namespace BizHawk.Client.Common else { Movie.StartNewPlayback(); + LatchInputFromLog(); } }