[SDL] Input Callback?
pontus.pihlgren.5501 at student.uu.se
Tue Jul 2 21:57:01 PDT 2002
I was tinkering with keyboard input the other day and I thought that it
would be nice to have a callback function that analysed keyboard input
whenever a keyboard event occured. I found the Event filter but I was
rather dissapointed when I read that you still have to call
SDL_PumpEvents() to get any events generated. The whole issue was that I
didn't want to wait for my main gameloop to finish before I could
process input again. I solved it by placing input handling in a separate
But my real question boils down to: Why doesn't SDL gather the events
automaticaly and pass it to a callback function (such as the event
filter)? Doesn't most OS's allow interupt filters to be installed in the
running kernel?(which SDL could do for you).
More information about the SDL