From f5039ca320fb4e59bca147f3b8fa40c1d2d1c215 Mon Sep 17 00:00:00 2001 From: Allanis Date: Fri, 21 Jun 2013 20:34:01 +0100 Subject: [PATCH] [Change] Cosmetic tweakage. --- src/lephisto.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/lephisto.c b/src/lephisto.c index 0e26701..45d5bdd 100644 --- a/src/lephisto.c +++ b/src/lephisto.c @@ -262,9 +262,12 @@ static double fps_dt = 1.; static double dt = 0.; // @brief Controls the FPS. static void fps_control(void) { + unsigned int t; + // dt in ms/1000. - dt = (double)(SDL_GetTicks() - gtime) / 1000.; - gtime = SDL_GetTicks(); + t = SDL_GetTicks(); + dt = (double)(t-gtime)/1000.; + gtime = t; if(paused) SDL_Delay(10); // Drop paused FPS to be nice to the CPU.