On 16/07/2008, Stuart Overton <[EMAIL PROTECTED]> wrote: > No, my first message may not have gotten through, as I posted immediately > after joining the mailing list.
Hi Stuart, Yes that makes sense... when you post the quit event it exits the with-events macro, but it also posts the SDL event SDL_QUIT which closes all the SDL stuff down and exits the app. What you're doing seems fine, looking at the code for with-events. What I'm doing which side steps this issue is to have my event handlers just store information in various systems, and then all the logic for my app is done in the idle. For example, input goes to the input system http://code.google.com/p/lisp-game-engine/source/browse/trunk/input.lisp Then my key handling in the main loop looks like this... (:key-down-event (:key key) (input:handle-key-down key)) (:key-up-event (:key key) (input:handle-key-up key)) Then in my main app loop I can check for input like this : (input:key-held-p :SDL-KEY-A) and the extra level of indirection lets me store additional info. For example I keep track of key press times and you can say (input:key-held-time :SDL-KEY-A) returns how long the key is held down. Justin _______________________________________________ application-builder mailing list [email protected] http://www.lispniks.com/mailman/listinfo/application-builder
