Table Of Contents
- What is supported?
- I'm using SDL audio and my application locks up immediately.
- Why do I see bad flickering on my double-buffered surfaces?
- Why don't threads, mutexes, and semaphores work?
Q: What is supported? A: SDL supports MacOS 9.0 and newer using both the ROM toolbox routines and GameSprockets. It is possible to support older versions of MacOS, and if you need this for any reason please contact the SDL mailing list. SDL can be built with either MPW (Apple's free compiler) or CodeWarrior.
Q: I'm using SDL audio and my application locks up immediately. A: Your audio callback will be called at interrupt time, so you should do no I/O in it, nor should you call functions that change the memory heap, like malloc(), free() etc. Not following this rule will lead to hard crashes on classic MacOS.
Q: Why do I see bad flickering on my double-buffered surfaces? A: The default SDL video driver does not do VBL-based flipping so it cannot sync to the monitor refresh. The DrawSprocket driver does do VBL-sync. Hold down the command key when starting your app and select the DSp driver. Or, you can add this line before you call SDL_Init():
putenv("SDL_VIDEODRIVER=DSp");
Q: Why don't threads, mutexes, and semaphores work? A: Threads are not implemented because of limitations in Mac OS 9. While Mac OS 9 has preemptive threads and synchronization primitives as part of the MPLibrary and DriverServicesLib, the usefulness of any implementation is very limited due to the fact that the majority of the Mac OS API's are not thread-safe. Hence, most of the SDL API's would not be thread-safe as they are built upon unsafe API's.
Often programmers are misled into using threads, when a single-threaded solution is faster, simpler, and more robust. If you are unsure if you really need them, ask on the SDL mailing list and someone will provide assistance.