]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Use gettime(GETTIME_FRAMESTART) instead of gettime(GETTIME_REALTIME) to calculate...
authorterencehill <piuntn@gmail.com>
Sun, 27 Sep 2020 10:27:28 +0000 (12:27 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 27 Sep 2020 13:51:23 +0000 (15:51 +0200)
qcsrc/client/hud/panel/engineinfo.qc
qcsrc/client/view.qc

index 85d4259778d1598d1c0204fe0322596bd004c20f..4d7fe5c77b7846077d96166d5d3104fdbb5d208c 100644 (file)
@@ -43,7 +43,7 @@ void HUD_EngineInfo()
                mySize -= '2 2 0' * panel_bg_padding;
        }
 
-       float currentTime = gettime(GETTIME_REALTIME);
+       float currentTime = gettime(GETTIME_FRAMESTART);
        if(autocvar_hud_panel_engineinfo_framecounter_exponentialmovingaverage)
        {
                float currentframetime = currentTime - prevfps_time;
index ee9164bae1a279b4c0038441b7b595c637c4a26f..6eb3c851563a70b67bd09d9ec061d7f80f120ef7 100644 (file)
@@ -372,7 +372,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))
        {
@@ -388,7 +389,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
 }