From: David C. <D. C. <si...@te...> - 2000-05-14 04:44:29
|
In writing my little app, I've run up against a bit of a issue - I don't know if it's appropriate for inclusion in pySDL or not. I check the event queue a couple of times per second with events_poll(). I'm really only interested in the event that's occurring at the moment of the poll, but I'm finding that (for example) a quick mouse motion across the window is filling up the queue with many events, each of which has to be grabbed from the queue sequentially. As a result, a mouse motion and then a click may take ten seconds to register with my program, as I poll() myself through the queue. What I'm looking for is an events_flush(), which would empty the queue when called. I realize that calling it after each poll() will result in jerky input response, but that's fine for my little hack. Other options would include writing an events_get() for each event type, or IGNORING and then re-ENABLING each event type as it happens. Does anyone have a way around this, or is a new method needed? David Clark si...@te... Preliminary pySDL documentation: http://www3.telus.net/futility/futility/docs/pysdl/index.html -- ------------------------------------------------------------------------- "The whole problem with the world is that fools and fanatics are always so certain of themselves, but wiser people so full of doubts." -Bertrand Russell |