]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
console parsing now behaves like qwcl, thanks to Fuh for pointing out the problems...
[xonotic/darkplaces.git] / vid_wgl.c
index d54dfafd1a64e373855ea12352ec430b50711206..64fed0390f8981f6ac34dc5d586e9a54f3a9a619 100644 (file)
--- 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 ();
 }
@@ -547,7 +539,7 @@ LONG WINAPI MainWndProc (HWND hWnd, UINT uMsg, WPARAM  wParam, LPARAM lParam)
                        vkey = MapKey(lParam, wParam);
                        GetKeyboardState (state);
                        ToAscii (wParam, vkey, state, &ascchar, 0);
-                       Key_Event (vkey, ascchar & 0xFF, down);
+                       Key_Event (vkey, (char)(ascchar & 0xFF), down);
                        break;
 
                case WM_SYSCHAR:
@@ -1324,6 +1316,7 @@ void IN_MouseMove (usercmd_t *cmd)
        {
                GetCursorPos (&current_pos);
                ui_mouseupdate(current_pos.x - window_x, current_pos.y - window_y);
+               in_mouse_x = in_mouse_y = 0;
                return;
        }
 
@@ -1641,7 +1634,6 @@ void Joy_AdvancedUpdate_f (void)
        }
 }
 
-
 /*
 ===========
 IN_Commands