mirror of
https://github.com/libretro/RetroArch
synced 2025-01-29 09:32:52 +00:00
Cleanups
This commit is contained in:
parent
da044da3b4
commit
ec370d54b2
@ -556,22 +556,22 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void menu_animation_update_time(void)
|
void menu_animation_update_time(bool timedate_enable)
|
||||||
{
|
{
|
||||||
static retro_time_t last_clock_update = 0;
|
static retro_time_t
|
||||||
settings_t *settings = config_get_ptr();
|
last_clock_update = 0;
|
||||||
|
|
||||||
cur_time = cpu_features_get_time_usec();
|
cur_time = cpu_features_get_time_usec();
|
||||||
delta_time = cur_time - old_time;
|
delta_time = cur_time - old_time;
|
||||||
|
|
||||||
if (delta_time >= IDEAL_DELTA_TIME* 4)
|
if (delta_time >= IDEAL_DELTA_TIME* 4)
|
||||||
delta_time = IDEAL_DELTA_TIME * 4;
|
delta_time = IDEAL_DELTA_TIME * 4;
|
||||||
if (delta_time <= IDEAL_DELTA_TIME / 4)
|
if (delta_time <= IDEAL_DELTA_TIME / 4)
|
||||||
delta_time = IDEAL_DELTA_TIME / 4;
|
delta_time = IDEAL_DELTA_TIME / 4;
|
||||||
old_time = cur_time;
|
old_time = cur_time;
|
||||||
|
|
||||||
if (((cur_time - last_clock_update) > 1000000)
|
if (((cur_time - last_clock_update) > 1000000)
|
||||||
&& settings->menu.timedate_enable)
|
&& timedate_enable)
|
||||||
{
|
{
|
||||||
animation_is_active = true;
|
animation_is_active = true;
|
||||||
last_clock_update = cur_time;
|
last_clock_update = cur_time;
|
||||||
|
@ -127,7 +127,7 @@ bool menu_animation_get_ideal_delta_time(menu_animation_ctx_delta_t *delta);
|
|||||||
|
|
||||||
bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker);
|
bool menu_animation_ticker(const menu_animation_ctx_ticker_t *ticker);
|
||||||
|
|
||||||
void menu_animation_update_time(void);
|
void menu_animation_update_time(bool timedate_enable);
|
||||||
|
|
||||||
bool menu_animation_is_active(void);
|
bool menu_animation_is_active(void);
|
||||||
|
|
||||||
|
@ -471,7 +471,8 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
|||||||
|
|
||||||
if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT))
|
if (BIT64_GET(menu_driver_data->state, MENU_STATE_BLIT))
|
||||||
{
|
{
|
||||||
menu_animation_update_time();
|
settings_t *settings = config_get_ptr();
|
||||||
|
menu_animation_update_time(settings->menu.timedate_enable);
|
||||||
menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL);
|
menu_driver_ctl(RARCH_MENU_CTL_BLIT_RENDER, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user