Limit paused video refresh when vsync is disabled (#16067)

This commit is contained in:
sonninnos 2024-01-02 20:01:19 +02:00 committed by GitHub
parent 4220e5683d
commit 945ad4a89f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -6939,6 +6939,17 @@ int runloop_iterate(void)
netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL);
#endif
video_driver_cached_frame();
/* Limit paused video refresh when vsync is disabled */
if (!settings->bools.video_vsync)
{
float refresh_rate = (video_st->video_refresh_rate_original)
? video_st->video_refresh_rate_original : settings->floats.video_refresh_rate;
runloop_st->frame_limit_minimum_time = (retro_time_t)roundf(1000000.0f / refresh_rate);
goto end;
}
return 1;
case RUNLOOP_STATE_MENU:
#ifdef HAVE_NETWORKING