Skip to content
Permalink
Browse files

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.
  • Loading branch information
slouken committed Jan 29, 2006
1 parent 925f293 commit a8f3ffac29bfd78dfa99838d814ff2b78cb66edb
Showing with 9 additions and 1 deletion.
  1. +1 −1 src/events/SDL_keyboard.c
  2. +8 −0 src/events/SDL_mouse.c
@@ -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;

0 comments on commit a8f3ffa

Please sign in to comment.