From 27d53faa6debd654baf8d21ab2eee4cb614706a7 Mon Sep 17 00:00:00 2001 From: Tom White Date: Thu, 14 Aug 2008 22:20:07 +0100 Subject: Framerate stuff should use 'time', not 'tlast' --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index 2624485..09ed04b 100644 --- a/src/main.c +++ b/src/main.c @@ -214,7 +214,7 @@ int main(int argc, char *argv[]) { finished = 0; game->time = 0.0; game->tlast = utils_highresms(); - game->t_fps = game->tlast; + game->t_fps = game->time; while ( !finished ) { int mx, my; @@ -292,7 +292,7 @@ int main(int argc, char *argv[]) { /* Calculate FPS every half a second */ game->frames++; - if ( game->time - game->t_fps > 500 ) { + if ( game->time - game->t_fps > 500.0 ) { game->fps = (500*game->frames) / (game->time - game->t_fps); game->t_fps = game->time; game->frames = 0; -- cgit v1.2.3