[SDL] SDL_WaitEvent/PushEvent slowness?
nbs at sonic.net
Thu Jun 8 18:19:36 PDT 2006
On Thu, Jun 08, 2006 at 08:48:28PM -0400, Jay Summet wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> I know an event is appearing. (The user presses a key.) I'm talking about "lag"
> between when the user presses the key and when the corresponding feedback
> appears on the screen. It's longer using WaitEvent than when using PeekEvent.
I don't have your post in front of me, but... IIRC, you seemed to be handling
only one event at a time.
whereas handling all of them makes a lot more sense; you could end up
getting a TON of events if you're not filtering out mouse-motion, for example.
So this might be better:
and, of course, I'm kind of worried about infinite loops by pushing events
_back onto_ the event queue in response to _reading_ events, but again, I don't
have your code in front of me, and am not 100% sure what the point of your
code was, so apologies if my response is way off. ;)
bill at newbreedsoftware.com
More information about the SDL