System: Frame step after runahead

Makes it behave as expected.
This commit is contained in:
Stenzek 2024-12-19 20:56:02 +10:00
parent 2d659fc3eb
commit 7826c258b0
No known key found for this signature in database
1 changed files with 7 additions and 6 deletions

View File

@ -2067,12 +2067,6 @@ void System::FrameDone()
s_state.socket_multiplexer->PollEventsWithTimeout(0); s_state.socket_multiplexer->PollEventsWithTimeout(0);
#endif #endif
if (s_state.frame_step_request)
{
s_state.frame_step_request = false;
PauseSystem(true);
}
// Save states for rewind and runahead. // Save states for rewind and runahead.
if (s_state.rewind_save_counter >= 0) if (s_state.rewind_save_counter >= 0)
{ {
@ -2111,6 +2105,13 @@ void System::FrameDone()
SaveMemoryState(AllocateMemoryState()); SaveMemoryState(AllocateMemoryState());
} }
// Frame step after runahead, otherwise the pause takes precedence and the replay never happens.
if (s_state.frame_step_request)
{
s_state.frame_step_request = false;
PauseSystem(true);
}
Timer::Value current_time = Timer::GetCurrentValue(); Timer::Value current_time = Timer::GetCurrentValue();
// pre-frame sleep accounting (input lag reduction) // pre-frame sleep accounting (input lag reduction)