]> git.rm.cloudns.org Git - xonotic/darkplaces.git/commitdiff
reverted code that used vid_grabkeyboard for SDL input grabbing, because
authorhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 28 Nov 2007 07:03:10 +0000 (07:03 +0000)
committerhavoc <havoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 28 Nov 2007 07:03:10 +0000 (07:03 +0000)
this allowed the mouse to leave the window which is unacceptable

git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@7728 d7cf8633-e32d-0410-b094-e92efae38249

vid_sdl.c

index da6f52992e335d644595f7d583fc836f0ffabece..a9adbde319a634594c08f2a2cef5cd59f29bb543 100644 (file)
--- a/vid_sdl.c
+++ b/vid_sdl.c
@@ -242,9 +242,7 @@ static void IN_Activate( qboolean grab )
                {
                        vid_usingmouse = true;
                        cl_ignoremousemove = true;
-                       if(vid_grabkeyboard.integer) {
-                               SDL_WM_GrabInput( SDL_GRAB_ON );
-                       }
+                       SDL_WM_GrabInput( SDL_GRAB_ON );
                        SDL_ShowCursor( SDL_DISABLE );
                }               
        }
@@ -254,9 +252,7 @@ static void IN_Activate( qboolean grab )
                {
                        vid_usingmouse = false;
                        cl_ignoremousemove = true;
-                       if(vid_grabkeyboard.integer) {
-                               SDL_WM_GrabInput( SDL_GRAB_OFF );
-                       }
+                       SDL_WM_GrabInput( SDL_GRAB_OFF );
                        SDL_ShowCursor( SDL_ENABLE );
                }
        }
@@ -754,8 +750,7 @@ int VID_InitMode(int fullscreen, int width, int height, int bpp, int refreshrate
        vid_activewindow = false;
        vid_usingmouse = false;
 
-       if(!vid_grabkeyboard.integer)
-               SDL_WM_GrabInput(SDL_GRAB_OFF);
+       SDL_WM_GrabInput(SDL_GRAB_OFF);
        return true;
 }