Mercurial > sdl-ios-xcode
comparison 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 |
comparison
equal
deleted
inserted
replaced
3858:9ffd318e7b64 | 3859:5d14acfdf84d |
---|---|
174 printf("sdl:video:gem: check mouse mode\n"); | 174 printf("sdl:video:gem: check mouse mode\n"); |
175 #endif | 175 #endif |
176 | 176 |
177 /* If the mouse is hidden and input is grabbed, we use relative mode */ | 177 /* If the mouse is hidden and input is grabbed, we use relative mode */ |
178 if ( (!(SDL_cursorstate & CURSOR_VISIBLE)) && | 178 if ( (!(SDL_cursorstate & CURSOR_VISIBLE)) && |
179 /*(this->input_grab != SDL_GRAB_OFF) && */ /* Damn GEM can not grab */ | 179 (this->input_grab != SDL_GRAB_OFF) && |
180 (SDL_GetAppState() & SDL_APPACTIVE) ) { | 180 (SDL_GetAppState() & SDL_APPACTIVE) ) { |
181 SDL_AtariXbios_LockMousePosition(SDL_TRUE); | |
181 GEM_mouse_relative = SDL_TRUE; | 182 GEM_mouse_relative = SDL_TRUE; |
182 } else { | 183 } else { |
184 SDL_AtariXbios_LockMousePosition(SDL_FALSE); | |
183 GEM_mouse_relative = SDL_FALSE; | 185 GEM_mouse_relative = SDL_FALSE; |
184 graf_mouse(M_ON, NULL); | 186 graf_mouse(M_ON, NULL); |
185 } | 187 } |
186 } | 188 } |