From 6c3a0b538ab4def62e0c550669fcf07eb7a288b5 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Tue, 27 Sep 2005 08:36:28 +0000 Subject: [PATCH] =?UTF-8?q?Date:=20Sun,=2011=20Sep=202005=2014:41:07=20+03?= =?UTF-8?q?00=20(EEST)=20From:=20=3D=3FISO-8859-1=3FQ=3FMartin=5FStorsj=3D?= =?UTF-8?q?F6=3F=3D=20=20To:=20sdl@libsdl.org=20Subject:?= =?UTF-8?q?=20[SDL]=20[PATCH]=20Switching=20between=20fullscreen/windowed?= =?UTF-8?q?=20on=20OS=20X?= 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 --- src/video/quartz/SDL_QuartzVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index 353d318be..6c369bc2e 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -450,7 +450,7 @@ static void QZ_UnsetVideoMode (_THIS) { 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);