[SDL] SDL_PollEvent()

pixel fairy pixelfairy at gmail.com
Thu Nov 2 15:55:54 PST 2006


most of us are using SDL_PollEvent() in our "main" loop, and ive seen some
workarounds for things like checking network traffic etc. you might as well
just check those buffers in serial, since thats what SDL_PollEvent() does
anyway.

im telling you all this because i thought it was something like a  select()
or poll() loop and wanted to make a function to add another filehandle to
it. adding to SDL_PumpEvents might make the code cleaner to look at, but
wouldnt really buy anything. (thought about having pumpevents go through a
linked list of function pointers so you could just keep adding your own, but
thats silly when you think of the final result being serially checked
anyway)

would making it a poll/select call be bad? or just too much work for the
gain? i like to make light apps, that only hit the cpu when they need to by
waiting on input until its time to swap buffers.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20061102/5368eb05/attachment.htm 


More information about the SDL mailing list