From 240869046b91a47d22be952cbc86a01de4dcc9ba Mon Sep 17 00:00:00 2001 From: Allanis Date: Sun, 21 Jul 2013 16:03:32 +0100 Subject: [PATCH] [Fix] dt weirdness on low fps. --- src/lephisto.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lephisto.c b/src/lephisto.c index 3f639b0..867b92f 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -302,7 +302,7 @@ static void fps_control(void) { } } -const double fps_min = 1./50.0; +static const double fps_min = 1./50.0; /** * @brief Updates the game itself (player flying around etc). */ @@ -325,8 +325,10 @@ static void update_all(void) { update_routine(fps_min); tmpdt -= fps_min; } - } - update_routine(cur_dt); + /* Note we don't touch cur_dt so that fps_delay works well. */ + update_routine(tmpdt); /* Leftovers. */ + } else /* Standard, just update with the last dt. */ + update_routine(cur_dt); } /**