aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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;