Commit c6c791fe authored by Sam Lantinga's avatar Sam Lantinga

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
parent ee646e66
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment