From fbebdcb91d67403d6a14a173414ff031083d5fd3 Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Sat, 23 Jun 2001 18:51:29 +0000 Subject: [PATCH] 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/video/x11/SDL_x11mouse.c b/src/video/x11/SDL_x11mouse.c index c653cac32..e506a610e 100644 --- a/src/video/x11/SDL_x11mouse.c +++ b/src/video/x11/SDL_x11mouse.c @@ -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) ) {