Movie playback - fix issue 358, duplicate input after a movie ends, note: this commit could be a breaking change for other movie related things (such as alternate movie end types other than the default of "finished")
This commit is contained in:
parent
7ce4fd206e
commit
57023ffcb7
|
@ -134,18 +134,11 @@ namespace BizHawk.Client.Common
|
|||
/// </summary>
|
||||
public void LatchInputFromLog()
|
||||
{
|
||||
if (Global.Emulator.Frame < Movie.InputLogLength - (Global.Config.MovieEndAction == MovieEndAction.Pause ? 1 : 0)) // Pause logic is a hack for now
|
||||
var input = Movie.GetInputState(Global.Emulator.Frame);
|
||||
MovieControllerAdapter.LatchFromSource(input);
|
||||
if (MultiTrack.IsActive)
|
||||
{
|
||||
var input = Movie.GetInputState(Global.Emulator.Frame);
|
||||
MovieControllerAdapter.LatchFromSource(input);
|
||||
if (MultiTrack.IsActive)
|
||||
{
|
||||
Global.MultitrackRewiringAdapter.Source = MovieControllerAdapter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
HandlePlaybackEnd();
|
||||
Global.MultitrackRewiringAdapter.Source = MovieControllerAdapter;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -235,6 +228,11 @@ namespace BizHawk.Client.Common
|
|||
|
||||
public void HandleMovieOnFrameLoop()
|
||||
{
|
||||
if (Movie.IsActive && !Movie.IsFinished && Global.Emulator.Frame >= Movie.InputLogLength)
|
||||
{
|
||||
HandlePlaybackEnd();
|
||||
}
|
||||
|
||||
if (!Movie.IsActive)
|
||||
{
|
||||
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||
|
|
Loading…
Reference in New Issue