Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Question about event handling

Name: Anonymous 2014-06-21 11:42

Let's say I use SDL (1.2 or 2.0) in my program to handle events, should I use callbacks or the good old giant switch statement?

Name: Anonymous 2014-06-22 18:50

>>73
Why don't you use SDL_AddEventWatch? It's O(1)!

http://wiki.libsdl.org/SDL_AddEventWatch
Use this function to add a callback to be triggered when an event is added to the event queue.

>>75
He's retarded. What he is saying is the same with 'lambda calculus is turing complete!'. He won't even show how to implement an observer with a closure -- I guarantee this.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List