gallium/hud: fix FPS computation for framerate > 4.2k
authorMarek Olšák <maraeo@gmail.com>
Thu, 11 Apr 2013 11:16:42 +0000 (13:16 +0200)
committerMarek Olšák <maraeo@gmail.com>
Tue, 16 Apr 2013 11:56:47 +0000 (13:56 +0200)
src/gallium/auxiliary/hud/hud_fps.c

index 71cdfd04ee7992e07caa9acb7ec03103cd808ef2..80381f54713550f13c07372aead503aae993e010 100644 (file)
@@ -47,7 +47,8 @@ query_fps(struct hud_graph *gr)
 
    if (info->last_time) {
       if (info->last_time + gr->pane->period <= now) {
-         double fps = info->frames * 1000000 / (double)(now - info->last_time);
+         double fps = (uint64_t)info->frames * 1000000 /
+                      (double)(now - info->last_time);
          info->frames = 0;
          info->last_time = now;