From 319fcca439177994b4ce0e40892c38e8cc436aea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jean-Andr=C3=A9=20Santoni?= Date: Tue, 24 Feb 2015 00:42:44 +0100 Subject: [PATCH] (Menu) Limit delta time to an acceptable range --- menu/drivers/xmb.c | 2 +- menu/menu.c | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 0210484c68..ea1d2390eb 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1136,7 +1136,7 @@ static void xmb_frame(void) if (!gl) return; - menu_animation_update(menu->animation, menu->dt / 7500000.0); + menu_animation_update(menu->animation, menu->dt / 8000000.0); glViewport(0, 0, gl->win_width, gl->win_height); diff --git a/menu/menu.c b/menu/menu.c index 5c7d13b12a..2091bb516c 100644 --- a/menu/menu.c +++ b/menu/menu.c @@ -376,6 +376,10 @@ int menu_iterate(retro_input_t input, menu->cur_time = rarch_get_time_usec(); menu->dt = menu->cur_time - menu->old_time; + if (menu->dt > 30000) + menu->dt = 30000; + if (menu->dt < 4000) + menu->dt = 4000; menu->old_time = menu->cur_time; if (driver.menu_ctx)