Fix new bugs from painting during auto-restore

fixes #2371
This commit is contained in:
RetroEdit 2020-09-03 18:11:37 +00:00
parent c1a113ce24
commit f3f5774bbb
No known key found for this signature in database
GPG Key ID: CE9E2A36E1EFA76F
2 changed files with 9 additions and 3 deletions

View File

@ -14,7 +14,7 @@ namespace BizHawk.Client.EmuHawk
if (frame <= Emulator.Frame)
{
if ((MainForm.EmulatorPaused || !MainForm.IsSeeking)
&& !CurrentTasMovie.LastPositionStable)
&& !CurrentTasMovie.LastPositionStable && !_playbackInterrupted)
{
LastPositionFrame = Emulator.Frame;
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated

View File

@ -1018,6 +1018,13 @@ namespace BizHawk.Client.EmuHawk
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)
{
DoAutoRestore();
@ -1025,11 +1032,10 @@ namespace BizHawk.Client.EmuHawk
_triggerAutoRestore = false;
_autoRestorePaused = null;
}
if (_playbackInterrupted)
{
MainForm.UnpauseEmulator();
MainForm.PauseOnFrame = null;
_playbackInterrupted = false;
}
}