mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Cleanups to update_frame_time
This commit is contained in:
parent
c016867b2b
commit
faf124d5ea
@ -2817,16 +2817,13 @@ error:
|
|||||||
|
|
||||||
static inline void update_frame_time(void)
|
static inline void update_frame_time(void)
|
||||||
{
|
{
|
||||||
retro_time_t delta = 0;
|
|
||||||
retro_time_t time = rarch_get_time_usec();
|
retro_time_t time = rarch_get_time_usec();
|
||||||
|
retro_time_t delta = time - g_extern.system.frame_time_last;
|
||||||
bool is_locked_fps = g_extern.is_paused || driver.nonblock_state;
|
bool is_locked_fps = g_extern.is_paused || driver.nonblock_state;
|
||||||
|
|
||||||
is_locked_fps |= !!driver.recording_data;
|
is_locked_fps |= !!driver.recording_data;
|
||||||
|
|
||||||
if (!g_extern.system.frame_time_last || is_locked_fps)
|
if (!g_extern.system.frame_time_last || is_locked_fps)
|
||||||
delta = g_extern.system.frame_time.reference;
|
delta = g_extern.system.frame_time.reference;
|
||||||
else
|
|
||||||
delta = time - g_extern.system.frame_time_last;
|
|
||||||
|
|
||||||
if (!is_locked_fps && g_extern.is_slowmotion)
|
if (!is_locked_fps && g_extern.is_slowmotion)
|
||||||
delta /= g_settings.slowmotion_ratio;
|
delta /= g_settings.slowmotion_ratio;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user