Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
77:1e7e61b9b0f9 | 78:e9582f471c02 |
---|---|
230 void X11_CheckMouseModeNoLock(_THIS) | 230 void X11_CheckMouseModeNoLock(_THIS) |
231 { | 231 { |
232 /* If the mouse is hidden and input is grabbed, we use relative mode */ | 232 /* If the mouse is hidden and input is grabbed, we use relative mode */ |
233 if ( !(SDL_cursorstate & CURSOR_VISIBLE) && | 233 if ( !(SDL_cursorstate & CURSOR_VISIBLE) && |
234 (this->input_grab != SDL_GRAB_OFF) && | 234 (this->input_grab != SDL_GRAB_OFF) && |
235 (SDL_GetAppState() & SDL_APPACTIVE) ) { | 235 (SDL_GetAppState() & SDL_APPACTIVE) && |
236 !getenv("SDL_MOUSE_NORELATIVE") ) { | |
236 if ( ! mouse_relative ) { | 237 if ( ! mouse_relative ) { |
237 X11_EnableDGAMouse(this); | 238 X11_EnableDGAMouse(this); |
238 if ( ! (using_dga & DGA_MOUSE) ) { | 239 if ( ! (using_dga & DGA_MOUSE) ) { |
239 char *xmouse_accel; | 240 char *xmouse_accel; |
240 | 241 |