This commit is contained in:
twinaphex 2017-01-17 16:55:34 +01:00
parent da044da3b4
commit ec370d54b2
3 changed files with 10 additions and 9 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);
} }