[SDL] SDL mouse events.
Jukka-Pekka Manninen
jmanninen at digitalchocolate.com
Sun Mar 16 23:59:24 PDT 2008
-----Original Message-----
From: sdl-bounces at lists.libsdl.org [mailto:sdl-bounces at lists.libsdl.org]
On Behalf Of Lucas
Subject: Re: [SDL] SDL mouse events.
> I set my program to 1fps (SDL_DELAY) and printed the event count, but
> somehow a mousemovement only adds a single event?
> Typing did as expected.
> Let me guess, SDL_DELAY disables mouse events. No that isn't it, as
> replacing the delay with a long dumb loop doesn't change a thing.
> What did I do wrong?
Maybe your OS combines mouse (motion) events if more than one occur
before the app handles them? Try adding an SDL_PumpEvents() call inside
your dumb loop to allow SDL to move input events to the (SDL) queue
(from the OS queue) and see what happens then.
-J
More information about the SDL
mailing list