SDL-1.2: Quartz fullscreen video contentRect was used uninitialized.

--HG--
branch : SDL-1.2
This commit is contained in:
Ryan C. Gordon
2010-04-25 20:16:38 -04:00
parent a487ef0eac
commit 1daff39d16

View File

@@ -479,6 +479,8 @@ static SDL_Surface* QZ_SetVideoFullScreen (_THIS, SDL_Surface *current, int widt
NSRect contentRect;
CGDisplayFadeReservationToken fade_token = kCGDisplayFadeReservationInvalidToken;
contentRect = NSMakeRect (0, 0, width, height);
/* Fade to black to hide resolution-switching flicker (and garbage
that is displayed by a destroyed OpenGL context, if applicable) */
if ( CGAcquireDisplayFadeReservation (5, &fade_token) == kCGErrorSuccess ) {