3 | | Note: this may need to change #1278 (System specific initialization during application startup). |
| 3 | Note: this may need to change #1278 (System specific initialization during application startup) |
| 4 | |
| 5 | '''Update 22/07/11:''' |
| 6 | |
| 7 | After some testing, we found that main thread execution is only required for Mac OS X, and we can limit this Mac OS specific approach to the sdl_dev.c only. The following is summary on thread execution model for SDL across various platforms. They are tested against '''SDL-1.3''' (latest from repository as of this date). |
| 8 | |
| 9 | '''Mac OS X:''' everything must be done in main thread. |
| 10 | |
| 11 | '''Linux/X11:''' drawing and event polling must be done in the same thread as the thread that created the window, otherwise there will be no picture. Multiple windows are supported, but they must be done in the same '''one thread''' (it doesn't have to be the main thread). If each of the window uses a separate thread, crash will happen during window creation. |
| 12 | |
| 13 | '''Windows:''' drawing and event polling must be done in the same thread as the thread that created the window. Multiple windows are supported, and each may use a dedicated thread, as long as window creation, drawing, and event polling for one window all use the same thread. |
| 14 | |
| 15 | |