]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
cl_main: Get new input events even if we're supposed to sleep
authorcloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 17:35:01 +0000 (17:35 +0000)
committercloudwalk <cloudwalk@d7cf8633-e32d-0410-b094-e92efae38249>
Mon, 20 Jul 2020 17:35:01 +0000 (17:35 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@12849 d7cf8633-e32d-0410-b094-e92efae38249

cl_main.c

index ef670d166ede8449daf22b95ddecc52585585da7..31ad52bc7b5c7333a03e7ca189cb0d9750603dcc 100644 (file)
--- a/cl_main.c
+++ b/cl_main.c
@@ -2723,6 +2723,11 @@ double CL_Frame (double time)
 
        CL_VM_PreventInformationLeaks();
 
+       // get new key events
+       Key_EventQueue_Unblock();
+       SndSys_SendKeyEvents();
+       Sys_SendKeyEvents();
+
        if((cl_timer += time) < 0)
                return cl_timer;
 
@@ -2732,11 +2737,6 @@ double CL_Frame (double time)
 
        if (cls.state != ca_dedicated && (cl_timer > 0 || cls.timedemo || ((vid_activewindow ? cl_maxfps : cl_maxidlefps).value < 1)))
        {
-               // get new key events
-               Key_EventQueue_Unblock();
-               SndSys_SendKeyEvents();
-               Sys_SendKeyEvents();
-
                R_TimeReport("---");
                Collision_Cache_NewFrame();
                R_TimeReport("photoncache");