Added the environment variable SDL_MOUSE_NORELATIVE to completely disable

relative mouse motion if the application desires it.  UNDOCUMENTED!!

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%4079
This commit is contained in:
Sam Lantinga 2001-06-23 18:51:29 +00:00
parent 4cb38efa33
commit b51058100e

View file

@ -232,7 +232,8 @@ void X11_CheckMouseModeNoLock(_THIS)
/* If the mouse is hidden and input is grabbed, we use relative mode */
if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
(this->input_grab != SDL_GRAB_OFF) &&
(SDL_GetAppState() & SDL_APPACTIVE) ) {
(SDL_GetAppState() & SDL_APPACTIVE) &&
!getenv("SDL_MOUSE_NORELATIVE") ) {
if ( ! mouse_relative ) {
X11_EnableDGAMouse(this);
if ( ! (using_dga & DGA_MOUSE) ) {