inline function that is only called from one place

This commit is contained in:
SuuperW 2025-06-08 02:39:51 -05:00
parent bbf3560bd0
commit 672581476a
2 changed files with 8 additions and 22 deletions

View File

@ -830,7 +830,14 @@ namespace BizHawk.Client.EmuHawk
if (Emulator.Frame > frame)
{
GoToLastEmulatedFrameIfNecessary(frame);
if ((MainForm.EmulatorPaused || _seekingTo == -1)
&& !CurrentTasMovie.LastPositionStable)
{
RestorePositionFrame = Emulator.Frame;
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
}
GoToFrame(frame);
if (Settings.AutoRestoreLastPosition && RestorePositionFrame != -1)
{
StartSeeking(RestorePositionFrame);

View File

@ -79,27 +79,6 @@ namespace BizHawk.Client.EmuHawk
}
}
/// <summary>
/// Only goes to go to the frame if it is an event before current emulation, otherwise it is just a future event that can freely be edited
/// </summary>
private void GoToLastEmulatedFrameIfNecessary(int frame, bool OnLeftMouseDown = false)
{
if (frame != Emulator.Frame) // Don't go to a frame if you are already on it!
{
if (frame <= Emulator.Frame)
{
if ((MainForm.EmulatorPaused || _seekingTo == -1)
&& !CurrentTasMovie.LastPositionStable)
{
RestorePositionFrame = Emulator.Frame;
CurrentTasMovie.LastPositionStable = true; // until new frame is emulated
}
GoToFrame(frame, false, false, OnLeftMouseDown);
}
}
}
public void GoToPreviousMarker()
{
if (Emulator.Frame > 0)