Date: Sun, 11 Sep 2005 14:41:07 +0300 (EEST)
authorRyan C. Gordon <icculus@icculus.org>
Tue, 27 Sep 2005 08:36:28 +0000
changeset 1144509295d5a023
parent 1143 71a2648acc75
child 1145 d31afac94eff
Date: Sun, 11 Sep 2005 14:41:07 +0300 (EEST)
From: =?ISO-8859-1?Q?Martin_Storsj=F6?= <martin@martin.st>
To: sdl@libsdl.org
Subject: [SDL] [PATCH] Switching between fullscreen/windowed on OS X

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
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Thu Sep 22 08:48:16 2005 +0000
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Tue Sep 27 08:36:28 2005 +0000
     1.3 @@ -450,7 +450,7 @@
     1.4          gamma_error = QZ_FadeGammaOut (this, &gamma_table);
     1.5  
     1.6          /*  Release double buffer stuff */
     1.7 -        if ( mode_flags & (SDL_HWSURFACE|SDL_DOUBLEBUF)) {
     1.8 +        if ( mode_flags & SDL_DOUBLEBUF) {
     1.9              quit_thread = YES;
    1.10              SDL_SemPost (sem1);
    1.11              SDL_WaitThread (thread, NULL);