Skip to content

Commit

Permalink
Added the environment variable SDL_MOUSE_NORELATIVE to completely dis…
Browse files Browse the repository at this point in the history
…able

relative mouse motion if the application desires it.  UNDOCUMENTED!!
  • Loading branch information
Sam Lantinga committed Jun 23, 2001
1 parent ce0869a commit fbebdcb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/video/x11/SDL_x11mouse.c
Expand Up @@ -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) ) {
Expand Down

0 comments on commit fbebdcb

Please sign in to comment.