]> de.git.xonotic.org Git - xonotic/darkplaces.git/blobdiff - vid_wgl.c
Moved an extern to the proper header.
[xonotic/darkplaces.git] / vid_wgl.c
index d54dfafd1a64e373855ea12352ec430b50711206..85343a9ed69b96b0ad8cf2e479aaa08b615f8736 100644 (file)
--- a/vid_wgl.c
+++ b/vid_wgl.c
@@ -24,8 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 #include "resource.h"
 #include <commctrl.h>
 
-int cl_available = true;
-
 int (WINAPI *qwglChoosePixelFormat)(HDC, CONST PIXELFORMATDESCRIPTOR *);
 int (WINAPI *qwglDescribePixelFormat)(HDC, int, UINT, LPPIXELFORMATDESCRIPTOR);
 //int (WINAPI *qwglGetPixelFormat)(HDC);
@@ -431,14 +429,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 ();
 }
@@ -476,7 +466,6 @@ void AppActivate(BOOL fActive, BOOL minimize)
 
        if (fActive)
        {
-               vid_allowhwgamma = true;
                if (vid_isfullscreen)
                {
                        if (vid_wassuspended)
@@ -493,7 +482,6 @@ void AppActivate(BOOL fActive, BOOL minimize)
 
        if (!fActive)
        {
-               vid_allowhwgamma = false;
                vid_usingmouse = false;
                IN_DeactivateMouse ();
                IN_ShowMouse ();
@@ -547,7 +535,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:
@@ -1323,7 +1311,8 @@ void IN_MouseMove (usercmd_t *cmd)
        if (!mouseactive)
        {
                GetCursorPos (&current_pos);
-               ui_mouseupdate(current_pos.x - window_x, current_pos.y - window_y);
+               //ui_mouseupdate(current_pos.x - window_x, current_pos.y - window_y);
+               in_mouse_x = in_mouse_y = 0;
                return;
        }
 
@@ -1641,7 +1630,6 @@ void Joy_AdvancedUpdate_f (void)
        }
 }
 
-
 /*
 ===========
 IN_Commands