diff options
author | Tom White <weiss@simba.(none)> | 2008-08-14 22:20:07 +0100 |
---|---|---|
committer | Tom White <weiss@simba.(none)> | 2008-08-14 22:20:07 +0100 |
commit | 27d53faa6debd654baf8d21ab2eee4cb614706a7 (patch) | |
tree | 64df68a7580bcfd68e60f75d6de0228b166f8ba6 | |
parent | 990e02a2f06d4823668997b5b6dd60024f38124a (diff) |
Framerate stuff should use 'time', not 'tlast'
-rw-r--r-- | src/main.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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; |