Commit b5105810 authored by Sam Lantinga's avatar Sam Lantinga

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
parent 4cb38efa
...@@ -232,7 +232,8 @@ void X11_CheckMouseModeNoLock(_THIS) ...@@ -232,7 +232,8 @@ void X11_CheckMouseModeNoLock(_THIS)
/* If the mouse is hidden and input is grabbed, we use relative mode */ /* If the mouse is hidden and input is grabbed, we use relative mode */
if ( !(SDL_cursorstate & CURSOR_VISIBLE) && if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
(this->input_grab != SDL_GRAB_OFF) && (this->input_grab != SDL_GRAB_OFF) &&
(SDL_GetAppState() & SDL_APPACTIVE) ) { (SDL_GetAppState() & SDL_APPACTIVE) &&
!getenv("SDL_MOUSE_NORELATIVE") ) {
if ( ! mouse_relative ) { if ( ! mouse_relative ) {
X11_EnableDGAMouse(this); X11_EnableDGAMouse(this);
if ( ! (using_dga & DGA_MOUSE) ) { if ( ! (using_dga & DGA_MOUSE) ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment