From: havoc Date: Thu, 14 Feb 2008 23:03:11 +0000 (+0000) Subject: always call Sleep(0) at the end of each frame on Windows, I hope this X-Git-Tag: xonotic-v0.1.0preview~2419 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=200dd623c0374ace6179d534fa9dfeea6e9eb6de;p=xonotic%2Fdarkplaces.git always call Sleep(0) at the end of each frame on Windows, I hope this fixes problems with Logitech input drivers freezing the game for 50+ milliseconds every 3 seconds or so, and has no harm to framerate in testing git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@8097 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_wgl.c b/vid_wgl.c index 88cc6814..603adbfc 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -267,6 +267,11 @@ void VID_Finish (qboolean allowmousegrab) SwapBuffers(baseDC); } + // make sure a context switch can happen every frame - Logitech drivers + // input drivers sometimes eat cpu time every 3 seconds or lag badly + // without this help + Sleep(0); + VID_UpdateGamma(false, 256); }