From c844379bd6b054f933128f2557825b37ca639f87 Mon Sep 17 00:00:00 2001 From: Morilli <35152647+Morilli@users.noreply.github.com> Date: Thu, 10 Oct 2024 04:24:31 +0200 Subject: [PATCH] Always render video when at end of turbo seek - resolves #2081 This is only noticable on cores that implement (video) frame skip. --- src/BizHawk.Client.EmuHawk/MainForm.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/BizHawk.Client.EmuHawk/MainForm.cs b/src/BizHawk.Client.EmuHawk/MainForm.cs index a4549918f2..62087b2a89 100644 --- a/src/BizHawk.Client.EmuHawk/MainForm.cs +++ b/src/BizHawk.Client.EmuHawk/MainForm.cs @@ -3027,13 +3027,14 @@ namespace BizHawk.Client.EmuHawk } // why not skip audio if the user doesn't want sound bool renderSound = (Config.SoundEnabled && !IsTurboing) - || (_currAviWriter?.UsesAudio ?? false); + || _currAviWriter?.UsesAudio is true; if (!renderSound) { atten = 0; } - bool render = !InvisibleEmulation && (!_throttle.skipNextFrame || (_currAviWriter?.UsesVideo ?? false)); + bool atTurboSeekEnd = IsTurboSeeking && Emulator.Frame == PauseOnFrame.Value - 1; + bool render = !InvisibleEmulation && (!_throttle.skipNextFrame || _currAviWriter?.UsesVideo is true || atTurboSeekEnd); bool newFrame = Emulator.FrameAdvance(InputManager.ControllerOutput, render, renderSound); MovieSession.HandleFrameAfter(); @@ -3060,7 +3061,7 @@ namespace BizHawk.Client.EmuHawk PressFrameAdvance = false; // Update tools, but not if we're at the end of a turbo seek. In that case, updating will happen later when the seek is ended. - if (!(IsTurboSeeking && Emulator.Frame == PauseOnFrame.Value)) + if (!atTurboSeekEnd) { if (IsTurboing) {