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:
Sam Lantinga 2006-01-29 08:18:06 +00:00
parent ee646e66c0
commit c6c791fee6
2 changed files with 9 additions and 1 deletions

View file

@ -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;