Added the environment variable SDL_MOUSE_NORELATIVE to completely disable
authorSam Lantinga <slouken@lokigames.com>
Sat, 23 Jun 2001 18:51:29 +0000
changeset 78e9582f471c02
parent 77 1e7e61b9b0f9
child 79 ffadd05de74d
Added the environment variable SDL_MOUSE_NORELATIVE to completely disable
relative mouse motion if the application desires it. UNDOCUMENTED!!
src/video/x11/SDL_x11mouse.c
     1.1 --- a/src/video/x11/SDL_x11mouse.c	Tue Jun 19 21:07:12 2001 +0000
     1.2 +++ b/src/video/x11/SDL_x11mouse.c	Sat Jun 23 18:51:29 2001 +0000
     1.3 @@ -232,7 +232,8 @@
     1.4  	/* If the mouse is hidden and input is grabbed, we use relative mode */
     1.5  	if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
     1.6  	     (this->input_grab != SDL_GRAB_OFF) &&
     1.7 -             (SDL_GetAppState() & SDL_APPACTIVE) ) {
     1.8 +             (SDL_GetAppState() & SDL_APPACTIVE) &&
     1.9 +	     !getenv("SDL_MOUSE_NORELATIVE") ) {
    1.10  		if ( ! mouse_relative ) {
    1.11  			X11_EnableDGAMouse(this);
    1.12  			if ( ! (using_dga & DGA_MOUSE) ) {