Hi,
When switching from fullscreen to windowed mode for opengl applications,
the current version of SDL sets an harmless error, regarding usage of a
NULL semaphore. This is due to code which tries to shut down a blitting
thread, which is only started for double buffered 2d video modes, not for
opengl. The attached patch fixes this.
// Martin
-------------- next part --------------
diff -urN SDL-1.2.9-orig/src/video/quartz/SDL_QuartzVideo.m SDL-1.2.9/src/video/quartz/SDL_QuartzVideo.m
— SDL-1.2.9-orig/src/video/quartz/SDL_QuartzVideo.m 2005-08-18 09:46:32.000000000 +0300
+++ SDL-1.2.9/src/video/quartz/SDL_QuartzVideo.m 2005-09-11 14:04:57.000000000 +0300
@@ -450,7 +450,7 @@
gamma_error = QZ_FadeGammaOut (this, &gamma_table);
/* Release double buffer stuff */
-
if ( mode_flags & (SDL_HWSURFACE|SDL_DOUBLEBUF)) {
-
if ( mode_flags & SDL_DOUBLEBUF) { quit_thread = YES; SDL_SemPost (sem1); SDL_WaitThread (thread, NULL);