I just “discovered” (during a debugging session with a debugger w/o
thread support… aargh!) that SDL_PeepEvents() doesn’t work unless the
event thread is running.
SDL_PollEvent() does work, though. Does that mean that it’s only
SDL_PeepEvents() that needs the event thread - or is this just on my
system? (XFree86/Linux.)
My guess is that SDL_PeepEvents() requires the event thread because there
are no events queued to browse unless “something” - the event thread - is
there to grab them and turn them into SDL events.
However, I just had an idea: Why not poll all event sources for events
inside SDL_PeepEvents(), if the event thread isn’t active? Don’t know how
useful it would be, but there are debuggers without thread support, if
that counts… heh
Is this done on platforms without threads, or do they just not support
SDL_PeepEvents()?
Would this be possible to do on all supported platforms? (It would
require that all event sources can be polled - blocking-only sources
would ruin the whole idea.)
//David Olofson — Programmer, Reologica Instruments AB
.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |
-------------------------------------> http://olofson.net -’