]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/client/view.qc
Merge branch 'terencehill/fps_display_fix' into 'master'
[xonotic/xonotic-data.pk3dir.git] / qcsrc / client / view.qc
index c7b7a37c7eeb42cf32d685de43011e3af8ec96d2..2b4081aba8a477e379105df27480434754d77082 100644 (file)
@@ -399,7 +399,8 @@ void fpscounter_update()
        if(!STAT(SHOWFPS))
                return;
 
-       float currentTime = gettime(GETTIME_REALTIME);
+       float currentTime = gettime(GETTIME_FRAMESTART);
+
        showfps_framecounter += 1;
        if(currentTime - showfps_prevfps_time > STAT(SHOWFPS))
        {
@@ -415,7 +416,7 @@ void fpscounter_update()
 
 STATIC_INIT(fpscounter_init)
 {
-       float currentTime = gettime(GETTIME_REALTIME);
+       float currentTime = gettime(GETTIME_FRAMESTART);
        showfps_prevfps_time = currentTime; // we must initialize it to avoid an instant low frame sending
 }