[SDL] SDL mouse events.
Lucas
lucas_pet at live.co.uk
Sun Mar 16 16:51:30 PDT 2008
Thanks.
Yes, polled was the wrong word there, my bad. I meant sample rate.
I probably have this wrong, but this is how I see it:
You would want to be able to measure mouse motion of only one pixel.
A sample rate of 1000, constant mouse movement and a high screen resolution
this would amount to 1000 events per second on the queue.
Lets say that some part of your 3d game runs slow on that computer (lets say
5 fps), that would lead to event loss.
I'd rather set the sample rate of SDL to a lower frequency or
not let mouse events flood the queue by only accepting key events and use
GetRelativeMouseState for mouse movement.
>Is it possible to not let SDL push any mouse events on the queue? (I know
>people who poll their mouse at 1000Hz :/)
>That statement doesn't make a lot of sense to me. The rate at which the
>mouse is polled is not necessarily the rate at which mouse events are
> >generated. Often physical mouse movements are accumulated and a motion
>event is only generated when the position changes by some minimum >amount
>or a button changes state. Not to mention that a lot (most?) mouse
>information is processed as interrupts and not polled at all.
>Bob Pendleton
More information about the SDL
mailing list