Mercurial > sdl-ios-xcode
comparison src/video/quartz/SDL_QuartzVideo.m @ 1144:509295d5a023
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
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Tue, 27 Sep 2005 08:36:28 +0000 |
parents | 8e1fde455471 |
children | 72c6c3e5bb85 |
comparison
equal
deleted
inserted
replaced
1143:71a2648acc75 | 1144:509295d5a023 |
---|---|
448 NSRect screen_rect; | 448 NSRect screen_rect; |
449 | 449 |
450 gamma_error = QZ_FadeGammaOut (this, &gamma_table); | 450 gamma_error = QZ_FadeGammaOut (this, &gamma_table); |
451 | 451 |
452 /* Release double buffer stuff */ | 452 /* Release double buffer stuff */ |
453 if ( mode_flags & (SDL_HWSURFACE|SDL_DOUBLEBUF)) { | 453 if ( mode_flags & SDL_DOUBLEBUF) { |
454 quit_thread = YES; | 454 quit_thread = YES; |
455 SDL_SemPost (sem1); | 455 SDL_SemPost (sem1); |
456 SDL_WaitThread (thread, NULL); | 456 SDL_WaitThread (thread, NULL); |
457 SDL_DestroySemaphore (sem1); | 457 SDL_DestroySemaphore (sem1); |
458 SDL_DestroySemaphore (sem2); | 458 SDL_DestroySemaphore (sem2); |