From 596e46d2870cc3b380b9cf5dc6122ce90b1172e2 Mon Sep 17 00:00:00 2001 From: divverent Date: Wed, 19 Sep 2012 10:22:05 +0000 Subject: [PATCH] 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 --- cl_screen.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; -- 2.39.2