Sneak preview (0.9.10)

This is a sneak preview of the features coming up in SDL 0.9.10:

On Linux, if you define THREADED_EVENTS at compile time, a separate
thread will be spawned to gather X events asynchronously from the
graphics updates. This hasn’t been extensively tested, but it does
provide a means of handling keyboard and mouse input in a separate
thread from the graphics thread.

A special access function SDL_PeepEvents() allows you to manipulate
the event queue in a thread-safe manner, including peeking at events,
removing events of a specified type, and adding new events of arbitrary         type to the queue (use the new 'user' member of the SDL_Event type).

If you use SDL_PeepEvents() to gather events, then the main graphics
thread needs to call SDL_PumpEvents() periodically to drive the event
loop and generate input events.  This is not necessary if SDL has been
compiled with THREADED_EVENTS defined, but doesn't hurt.

A new function SDL_ThreadID() returns the identifier associated with
the current thread.

See ya!
-Sam Lantinga (slouken at

Lead Programmer, Loki Entertainment Software–
Author of Simple DirectMedia Layer -