Skip to content

Commit

Permalink
SDL-1.2: Quartz fullscreen video contentRect was used uninitialized.
Browse files Browse the repository at this point in the history
  • Loading branch information
icculus committed Apr 26, 2010
1 parent 0cdf5ce commit aae8d81
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -479,6 +479,8 @@ static void QZ_UnsetVideoMode (_THIS, BOOL to_desktop)
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 ) {
Expand Down

0 comments on commit aae8d81

Please sign in to comment.