From: molivier Date: Wed, 19 Nov 2003 07:50:53 +0000 (+0000) Subject: ClearAllStates cleared the key states twice in vid_wgl.c, and vid_glx.c didn't do... X-Git-Tag: xonotic-v0.1.0preview~6259 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=f2f1a440141375aa60b63357c035c73aa643b191;p=xonotic%2Fdarkplaces.git ClearAllStates cleared the key states twice in vid_wgl.c, and vid_glx.c didn't do that when he closes its window (which caused missed key strokes with vid_restart and the video options menu) git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@3657 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/vid_glx.c b/vid_glx.c index 1e5bb3a9..000156b2 100644 --- a/vid_glx.c +++ b/vid_glx.c @@ -556,6 +556,7 @@ void VID_Shutdown(void) ctx = NULL; GL_CloseLibrary(); + Key_ClearStates (); } void signal_handler(int sig) diff --git a/vid_wgl.c b/vid_wgl.c index 2f98be1f..64fed039 100644 --- a/vid_wgl.c +++ b/vid_wgl.c @@ -431,14 +431,6 @@ ClearAllStates */ void ClearAllStates (void) { - int i; - -// send an up event for each key, to make sure the server clears them all - for (i=0 ; i<256 ; i++) - { - Key_Event (i, 0, false); - } - Key_ClearStates (); IN_ClearStates (); }