diff src/video/x11/SDL_x11mouse.c @ 78:e9582f471c02

Added the environment variable SDL_MOUSE_NORELATIVE to completely disable relative mouse motion if the application desires it. UNDOCUMENTED!!
author Sam Lantinga <slouken@lokigames.com>
date Sat, 23 Jun 2001 18:51:29 +0000
parents 74212992fb08
children ffadd05de74d
line wrap: on
line diff
--- a/src/video/x11/SDL_x11mouse.c	Tue Jun 19 21:07:12 2001 +0000
+++ b/src/video/x11/SDL_x11mouse.c	Sat Jun 23 18:51:29 2001 +0000
@@ -232,7 +232,8 @@
 	/* 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) ) {