Peter Seibel <[EMAIL PROTECTED]> writes:

> 
> Luke Crook wrote:
> 
> > The thread that creates the SDL window must be the same thread that empties 
the 
> > SDL event queue. And that's about it. Other threads can freely call into 
any 
> > SDL function directly. 
> 
> Is it all made thread-safe at the C level? I.e. the SDL lib is designed 
> to be used this way with appropriate locks and critical sections, etc.?

I seems that I was just lucky.

>From the SDL Wiki: "(SDL 1.2.9) On win32 (this wasn't observed on unix), the 
initial thread must be the one polling the SDL events. Otherwise, keyboard 
events are no longer catched. Moreover, it is recommended to use SDL_mixer and 
SDL blitting functions from within that initial thread as well, otherwise the 
system becomes unstable (also only under win32) despite the proper use of 
mutexes and conditional variables. This unfortunately limits a lot the 
usefulness of threads when the software is also expected to run on win32."

http://www.libsdl.org/cgi/docwiki.cgi/SDL_5fCreateThread

- Luke


_______________________________________________
application-builder mailing list
[email protected]
http://www.lispniks.com/mailman/listinfo/application-builder

Reply via email to