[SDL] SDL_WaitEvent/PushEvent slowness?

Brian Barrett brian.ripoff at gmail.com
Thu Jun 8 15:32:08 PDT 2006


SDL_WaitEvent does exactly what it says, it waits for events. If there are
no events, it blocks. So your event will never be pushed until an external
event arrives. I've found that a SDL_Delay of around 10 ms just after my
render call achieves what you are looking for. You need a bit more work if
you have a specific framerate/logic rate in mind. No need for peekevent, etc

On 6/8/06, Jay Summet <jay at summet.com> wrote:
>
>
> Why doesn't a combination of SDL_WaitEvent/PushEvent  deliver the same
> performance as my PeepEvent code? It's simpler from a programmers
> prospective,
> and easier to understand.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20060608/e577881a/attachment.html 


More information about the SDL mailing list