Skip to content

Commit f6502b8

Browse files
authored
Don't Sleep to Sync in Non-VRR Normal Running State (#16189)
The check for sleeping to sync to a specific speed that is meant for fast forward/vrr could be true for a non-vrr normal core running state causing a possible sleep in a situation it was not intended for, especially at higher hz, and thus interfering with frame pacing.
1 parent 380daf1 commit f6502b8

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

runloop.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7225,7 +7225,13 @@ int runloop_iterate(void)
72257225
}
72267226

72277227
/* if there's a fast forward limit, inject sleeps to keep from going too fast. */
7228-
if (runloop_st->frame_limit_minimum_time)
7228+
if ( (runloop_st->frame_limit_minimum_time)
7229+
&& ( (vrr_runloop_enable)
7230+
|| (runloop_st->flags & RUNLOOP_FLAG_FASTMOTION)
7231+
#ifdef HAVE_MENU
7232+
|| (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE && !(settings->bools.video_vsync))
7233+
#endif
7234+
|| (runloop_st->flags & RUNLOOP_FLAG_PAUSED)))
72297235
{
72307236
const retro_time_t end_frame_time = cpu_features_get_time_usec();
72317237
const retro_time_t to_sleep_ms = (

0 commit comments

Comments
 (0)