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. --HG-- extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401286
This commit is contained in:
parent
ee646e66c0
commit
c6c791fee6
2 changed files with 9 additions and 1 deletions
|
@ -507,7 +507,7 @@ printf("The '%s' key has been %s\n", SDL_GetKeyName(keysym->sym),
|
|||
/* Drop events that don't change state */
|
||||
if ( SDL_KeyState[keysym->sym] == state ) {
|
||||
#if 0
|
||||
printf("Event didn't change state - dropped!\n");
|
||||
printf("Keyboard event didn't change state - dropped!\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
|
|
@ -170,6 +170,14 @@ int SDL_PrivateMouseMotion(Uint8 buttonstate, int relative, Sint16 x, Sint16 y)
|
|||
Yrel = Y-SDL_MouseY;
|
||||
}
|
||||
|
||||
/* Drop events that don't change state */
|
||||
if ( ! Xrel && ! Yrel ) {
|
||||
#if 0
|
||||
printf("Mouse event didn't change state - dropped!\n");
|
||||
#endif
|
||||
return(0);
|
||||
}
|
||||
|
||||
/* Update internal mouse state */
|
||||
SDL_ButtonState = buttonstate;
|
||||
SDL_MouseX = X;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue