]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cl_loadingscreen_fps: fix it on Linux
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 19 Sep 2012 10:22:05 +0000 (10:22 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 19 Sep 2012 10:22:05 +0000 (10:22 +0000)
Sys_DirtyTime returns double, float doesn't have enough accuracy to hold
a gettimeofday() result, which caused VERY seldom loading screen updates

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@11847 d7cf8633-e32d-0410-b094-e92efae38249

cl_screen.c

index 69f71010847eb306f5f17fb129d431a3d1de2a2e..dfc556187ece9948d970244709d5f7f938e2275f 100644 (file)
@@ -2131,7 +2131,7 @@ static void SCR_DrawLoadingScreen_SharedFinish (qboolean clear)
        VID_Finish();
 }
 
-static float loadingscreen_lastupdate;
+static double loadingscreen_lastupdate;
 
 void SCR_UpdateLoadingScreen (qboolean clear, qboolean startup)
 {
@@ -2145,7 +2145,7 @@ void SCR_UpdateLoadingScreen (qboolean clear, qboolean startup)
        // limit update rate
        if (scr_loadingscreen_maxfps.value)
        {
-               float t = Sys_DirtyTime();
+               double t = Sys_DirtyTime();
                if ((t - loadingscreen_lastupdate) < 1.0f/scr_loadingscreen_maxfps.value)
                        return;
                loadingscreen_lastupdate = t;