aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom White <weiss@simba.(none)>2008-08-14 22:20:07 +0100
committerTom White <weiss@simba.(none)>2008-08-14 22:20:07 +0100
commit27d53faa6debd654baf8d21ab2eee4cb614706a7 (patch)
tree64df68a7580bcfd68e60f75d6de0228b166f8ba6
parent990e02a2f06d4823668997b5b6dd60024f38124a (diff)
Framerate stuff should use 'time', not 'tlast'
-rw-r--r--src/main.c4
1 files 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;