From: divverent Date: Wed, 19 Sep 2012 10:22:05 +0000 (+0000) Subject: cl_loadingscreen_fps: fix it on Linux X-Git-Tag: xonotic-v0.8.0~96^2~191 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=596e46d2870cc3b380b9cf5dc6122ce90b1172e2;p=xonotic%2Fdarkplaces.git cl_loadingscreen_fps: fix it on Linux 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 --- diff --git a/cl_screen.c b/cl_screen.c index 69f71010..dfc55618 100644 --- a/cl_screen.c +++ b/cl_screen.c @@ -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;