comparison src/video/gem/SDL_gemmouse.c @ 2025:7312feb88dad

Allow grabing mouse by locking its position
author Patrice Mandin <patmandin@gmail.com>
date Tue, 12 Sep 2006 19:47:40 +0000
parents 091bb215baf9
children f54670a477bb
comparison
equal deleted inserted replaced
2024:cb0fd9cdd2a9 2025:7312feb88dad
165 void 165 void
166 GEM_CheckMouseMode(_THIS) 166 GEM_CheckMouseMode(_THIS)
167 { 167 {
168 /* If the mouse is hidden and input is grabbed, we use relative mode */ 168 /* If the mouse is hidden and input is grabbed, we use relative mode */
169 if ((!(SDL_cursorstate & CURSOR_VISIBLE)) && 169 if ((!(SDL_cursorstate & CURSOR_VISIBLE)) &&
170 /*(this->input_grab != SDL_GRAB_OFF) && *//* Damn GEM can not grab */ 170 (this->input_grab != SDL_GRAB_OFF) &&
171 (SDL_GetAppState() & SDL_APPACTIVE)) { 171 (SDL_GetAppState() & SDL_APPACTIVE)) {
172 SDL_AtariXbios_LockMousePosition(SDL_TRUE);
172 GEM_mouse_relative = SDL_TRUE; 173 GEM_mouse_relative = SDL_TRUE;
173 } else { 174 } else {
175 SDL_AtariXbios_LockMousePosition(SDL_FALSE);
174 GEM_mouse_relative = SDL_FALSE; 176 GEM_mouse_relative = SDL_FALSE;
175 graf_mouse(M_ON, NULL); 177 graf_mouse(M_ON, NULL);
176 } 178 }
177 } 179 }
178 180