comparison src/video/gem/SDL_gemmouse.c @ 319:189a6a3416c7

*** empty log message ***
author Sam Lantinga <slouken@libsdl.org>
date Tue, 26 Mar 2002 17:37:31 +0000
parents f6ffac90895c
children 028e03e273c8
comparison
equal deleted inserted replaced
318:0910a3034576 319:189a6a3416c7
134 } 134 }
135 135
136 return 1; 136 return 1;
137 } 137 }
138 138
139 #if 0
139 void GEM_WarpWMCursor(_THIS, Uint16 x, Uint16 y) 140 void GEM_WarpWMCursor(_THIS, Uint16 x, Uint16 y)
140 { 141 {
142 /* This seems to work only on AES 3.4 (Falcon) */
143
141 EVNTREC warpevent; 144 EVNTREC warpevent;
142 145
143 warpevent.ap_event = APPEVNT_MOUSE; 146 warpevent.ap_event = APPEVNT_MOUSE;
144 warpevent.ap_value = (y << 16) | x; 147 warpevent.ap_value = (x << 16) | y;
145 148
146 appl_tplay(&warpevent, 1, 1000); 149 appl_tplay(&warpevent, 1, 1000);
147 } 150 }
151 #endif
148 152
149 void GEM_CheckMouseMode(_THIS) 153 void GEM_CheckMouseMode(_THIS)
150 { 154 {
151 /* If the mouse is hidden and input is grabbed, we use relative mode */ 155 /* If the mouse is hidden and input is grabbed, we use relative mode */
152 if ( !(SDL_cursorstate & CURSOR_VISIBLE) && 156 if ( !(SDL_cursorstate & CURSOR_VISIBLE) &&
153 (this->input_grab != SDL_GRAB_OFF) ) { 157 (this->input_grab != SDL_GRAB_OFF) &&
158 (SDL_GetAppState() & SDL_APPACTIVE) ) {
154 GEM_mouse_relative = SDL_TRUE; 159 GEM_mouse_relative = SDL_TRUE;
155 } else { 160 } else {
156 GEM_mouse_relative = SDL_FALSE; 161 GEM_mouse_relative = SDL_FALSE;
157 } 162 }
158 } 163 }