Skip to content

Commit

Permalink
Use video refresh rate for menu frame limiting (#15886)
Browse files Browse the repository at this point in the history
  • Loading branch information
sonninnos authored Nov 10, 2023
1 parent 107283e commit f20c849
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions runloop.c
Original file line number Diff line number Diff line change
Expand Up @@ -6947,9 +6947,14 @@ int runloop_iterate(void)
#endif
#endif
#ifdef HAVE_MENU
/* Always run menu in 1x speed. */
/* Always run menu in video refresh rate speed. */
if (menu_state_get_ptr()->flags & MENU_ST_FLAG_ALIVE)
runloop_set_frame_limit(&video_st->av_info, 1.0f);
{
float refresh_rate = video_driver_get_refresh_rate();

runloop_st->frame_limit_minimum_time = (retro_time_t)
roundf(1000000.0f / ((refresh_rate) ? refresh_rate : settings->floats.video_refresh_rate));
}
else
runloop_set_frame_limit(&video_st->av_info, settings->floats.fastforward_ratio);
#endif
Expand Down

0 comments on commit f20c849

Please sign in to comment.