comparison src/events/SDL_mouse.c @ 1283:f214b6fae45a

Date: Fri, 14 Jan 2005 21:52:46 +0100 From: "SkunkGuru" Subject: [SDL] Repeated mousemotion event on notebook it seems that every ~500ms something fires a mousemotion event, but with the same x and y position. I tryed with both directx and windib video driver.
author Sam Lantinga <slouken@libsdl.org>
date Sun, 29 Jan 2006 08:18:06 +0000
parents 28ac87a38c17
children c9b51268668f
comparison
equal deleted inserted replaced
1282:217f5d5a49e5 1283:f214b6fae45a
166 the screen is windowed mode and the mouse is outside the window. 166 the screen is windowed mode and the mouse is outside the window.
167 */ 167 */
168 if ( ! relative && SDL_MouseX >= 0 && SDL_MouseY >= 0 ) { 168 if ( ! relative && SDL_MouseX >= 0 && SDL_MouseY >= 0 ) {
169 Xrel = X-SDL_MouseX; 169 Xrel = X-SDL_MouseX;
170 Yrel = Y-SDL_MouseY; 170 Yrel = Y-SDL_MouseY;
171 }
172
173 /* Drop events that don't change state */
174 if ( ! Xrel && ! Yrel ) {
175 #if 0
176 printf("Mouse event didn't change state - dropped!\n");
177 #endif
178 return(0);
171 } 179 }
172 180
173 /* Update internal mouse state */ 181 /* Update internal mouse state */
174 SDL_ButtonState = buttonstate; 182 SDL_ButtonState = buttonstate;
175 SDL_MouseX = X; 183 SDL_MouseX = X;