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.7.0~103 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=0304b22b60139ca4525c2fd396300292ba9cbb79;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 ::stable-branch::merge=596e46d2870cc3b380b9cf5dc6122ce90b1172e2 --- 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;