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
|
@ -133,8 +133,6 @@ namespace BizHawk.Client.Common
|
||||||
/// Latch input from the input log, if available
|
/// Latch input from the input log, if available
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public void LatchInputFromLog()
|
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);
|
var input = Movie.GetInputState(Global.Emulator.Frame);
|
||||||
MovieControllerAdapter.LatchFromSource(input);
|
MovieControllerAdapter.LatchFromSource(input);
|
||||||
|
@ -143,11 +141,6 @@ namespace BizHawk.Client.Common
|
||||||
Global.MultitrackRewiringAdapter.Source = MovieControllerAdapter;
|
Global.MultitrackRewiringAdapter.Source = MovieControllerAdapter;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
HandlePlaybackEnd();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
private void HandlePlaybackEnd()
|
private void HandlePlaybackEnd()
|
||||||
{
|
{
|
||||||
|
@ -235,6 +228,11 @@ namespace BizHawk.Client.Common
|
||||||
|
|
||||||
public void HandleMovieOnFrameLoop()
|
public void HandleMovieOnFrameLoop()
|
||||||
{
|
{
|
||||||
|
if (Movie.IsActive && !Movie.IsFinished && Global.Emulator.Frame >= Movie.InputLogLength)
|
||||||
|
{
|
||||||
|
HandlePlaybackEnd();
|
||||||
|
}
|
||||||
|
|
||||||
if (!Movie.IsActive)
|
if (!Movie.IsActive)
|
||||||
{
|
{
|
||||||
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
LatchInputFromPlayer(Global.MovieInputSourceAdapter);
|
||||||
|
|
Loading…
Reference in New Issue