Skip to content

Commit

Permalink
Don't Sleep to Sync in Non-VRR Normal Running State (#16189)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ophidon authored Feb 2, 2024
1 parent 380daf1 commit f6502b8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion runloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -7225,7 +7225,13 @@ int runloop_iterate(void)
}

/* if there's a fast forward limit, inject sleeps to keep from going too fast. */
if (runloop_st->frame_limit_minimum_time)
if ( (runloop_st->frame_limit_minimum_time)
&& ( (vrr_runloop_enable)
|| (runloop_st->flags & RUNLOOP_FLAG_FASTMOTION)
#ifdef HAVE_MENU
|| (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE && !(settings->bools.video_vsync))
#endif
|| (runloop_st->flags & RUNLOOP_FLAG_PAUSED)))
{
const retro_time_t end_frame_time = cpu_features_get_time_usec();
const retro_time_t to_sleep_ms = (
Expand Down

0 comments on commit f6502b8

Please sign in to comment.