Merge pull request #2372 from TASVideos/painting-auto-restore-fix
Fix new bugs from painting during auto-restore
This commit is contained in:
commit
1f19281ed1
|
@ -14,7 +14,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
if (frame <= Emulator.Frame)
|
if (frame <= Emulator.Frame)
|
||||||
{
|
{
|
||||||
if ((MainForm.EmulatorPaused || !MainForm.IsSeeking)
|
if ((MainForm.EmulatorPaused || !MainForm.IsSeeking)
|
||||||
&& !CurrentTasMovie.LastPositionStable)
|
&& !CurrentTasMovie.LastPositionStable && !_playbackInterrupted)
|
||||||
{
|
{
|
||||||
LastPositionFrame = Emulator.Frame;
|
LastPositionFrame = Emulator.Frame;
|
||||||
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
|
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
|
||||||
|
|
|
@ -1018,6 +1018,13 @@ namespace BizHawk.Client.EmuHawk
|
||||||
|
|
||||||
private void DoTriggeredAutoRestoreIfNeeded()
|
private void DoTriggeredAutoRestoreIfNeeded()
|
||||||
{
|
{
|
||||||
|
// Disable the seek that could have been initiated when painting.
|
||||||
|
// This must done before DoAutoRestore, otherwise it would disable the auto-restore seek.
|
||||||
|
if (_playbackInterrupted)
|
||||||
|
{
|
||||||
|
MainForm.PauseOnFrame = null;
|
||||||
|
}
|
||||||
|
|
||||||
if (_triggerAutoRestore)
|
if (_triggerAutoRestore)
|
||||||
{
|
{
|
||||||
DoAutoRestore();
|
DoAutoRestore();
|
||||||
|
@ -1025,11 +1032,10 @@ namespace BizHawk.Client.EmuHawk
|
||||||
_triggerAutoRestore = false;
|
_triggerAutoRestore = false;
|
||||||
_autoRestorePaused = null;
|
_autoRestorePaused = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_playbackInterrupted)
|
if (_playbackInterrupted)
|
||||||
{
|
{
|
||||||
MainForm.UnpauseEmulator();
|
MainForm.UnpauseEmulator();
|
||||||
MainForm.PauseOnFrame = null;
|
|
||||||
_playbackInterrupted = false;
|
_playbackInterrupted = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue