Restore video frame limit on unpause (#16183)
This commit is contained in:
parent
7558c99cfa
commit
494f6a10da
16
runloop.c
16
runloop.c
|
@ -4782,6 +4782,7 @@ void runloop_pause_checks(void)
|
||||||
presence_userdata_t userdata;
|
presence_userdata_t userdata;
|
||||||
#endif
|
#endif
|
||||||
video_driver_state_t *video_st = video_state_get_ptr();
|
video_driver_state_t *video_st = video_state_get_ptr();
|
||||||
|
settings_t *settings = config_get_ptr();
|
||||||
runloop_state_t *runloop_st = &runloop_state;
|
runloop_state_t *runloop_st = &runloop_state;
|
||||||
bool is_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
bool is_paused = (runloop_st->flags & RUNLOOP_FLAG_PAUSED) ? true : false;
|
||||||
bool is_idle = (runloop_st->flags & RUNLOOP_FLAG_IDLE) ? true : false;
|
bool is_idle = (runloop_st->flags & RUNLOOP_FLAG_IDLE) ? true : false;
|
||||||
|
@ -4819,12 +4820,21 @@ void runloop_pause_checks(void)
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_MENU);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Limit paused frames to video refresh. */
|
||||||
|
runloop_st->frame_limit_minimum_time = (retro_time_t)roundf(1000000.0f /
|
||||||
|
((video_st->video_refresh_rate_original)
|
||||||
|
? video_st->video_refresh_rate_original
|
||||||
|
: settings->floats.video_refresh_rate));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef HAVE_LAKKA
|
#ifdef HAVE_LAKKA
|
||||||
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
set_cpu_scaling_signal(CPUSCALING_EVENT_FOCUS_CORE);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Restore frame limit. */
|
||||||
|
runloop_set_frame_limit(&video_st->av_info, settings->floats.fastforward_ratio);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(HAVE_TRANSLATE) && defined(HAVE_GFX_WIDGETS)
|
#if defined(HAVE_TRANSLATE) && defined(HAVE_GFX_WIDGETS)
|
||||||
|
@ -6958,12 +6968,6 @@ int runloop_iterate(void)
|
||||||
netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL);
|
netplay_driver_ctl(RARCH_NETPLAY_CTL_PAUSE, NULL);
|
||||||
#endif
|
#endif
|
||||||
video_driver_cached_frame();
|
video_driver_cached_frame();
|
||||||
|
|
||||||
/* Limit paused video refresh. */
|
|
||||||
runloop_st->frame_limit_minimum_time = (retro_time_t)roundf(1000000.0f /
|
|
||||||
((video_st->video_refresh_rate_original)
|
|
||||||
? video_st->video_refresh_rate_original
|
|
||||||
: settings->floats.video_refresh_rate));
|
|
||||||
goto end;
|
goto end;
|
||||||
case RUNLOOP_STATE_MENU:
|
case RUNLOOP_STATE_MENU:
|
||||||
#ifdef HAVE_NETWORKING
|
#ifdef HAVE_NETWORKING
|
||||||
|
|
Loading…
Reference in New Issue