diff src/video/gem/SDL_gemmouse.c @ 3859:5d14acfdf84d SDL-1.2

Allow grabing mouse by locking its position
author Patrice Mandin <patmandin@gmail.com>
date Tue, 12 Sep 2006 19:34:18 +0000
parents b2d9881c8c88
children 0b4ebec67cad
line wrap: on
line diff
--- a/src/video/gem/SDL_gemmouse.c	Tue Sep 12 19:33:33 2006 +0000
+++ b/src/video/gem/SDL_gemmouse.c	Tue Sep 12 19:34:18 2006 +0000
@@ -176,10 +176,12 @@
 
 	/* If the mouse is hidden and input is grabbed, we use relative mode */
 	if ( (!(SDL_cursorstate & CURSOR_VISIBLE)) &&
-		/*(this->input_grab != SDL_GRAB_OFF) && */ /* Damn GEM can not grab */
+		(this->input_grab != SDL_GRAB_OFF) &&
              (SDL_GetAppState() & SDL_APPACTIVE) ) {
+		SDL_AtariXbios_LockMousePosition(SDL_TRUE);
 		GEM_mouse_relative = SDL_TRUE;
 	} else {
+		SDL_AtariXbios_LockMousePosition(SDL_FALSE);
 		GEM_mouse_relative = SDL_FALSE;
 		graf_mouse(M_ON, NULL);
 	}