[SDL] 1.3 Event source addition

Ryan C. Gordon icculus at icculus.org
Fri Jun 30 07:46:28 PDT 2006


> What is interesing with the ability of user defined event source is
> letting SDL do the query when it's needed.

I disagree. Formalizing this would add a lot of complexity, when you 
could just change your program from this...

while (SDL_PollEvent(&e)) {

...to this...

checkNetwork();  // will call SDL_PushEvent() if needed.
while (SDL_PollEvent(&e)) {   // will handle input and network events.


Now someone pointed out that there's no way to prevent two libraries 
from stepping on each other's SDL_USEREVENTs, and that's probably worth 
fixing.

--ryan.





More information about the SDL mailing list