Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs. SDL-1.2
authorRyan C. Gordon <icculus@icculus.org>
Sun, 17 Jul 2011 01:03:13 -0700
branchSDL-1.2
changeset 5568abe7d0b3539b
parent 5565 4225f09eb8cb
child 5569 d81e8404bd7f
Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs.
src/video/quartz/SDL_QuartzVideo.m
     1.1 --- a/src/video/quartz/SDL_QuartzVideo.m	Thu Jul 14 15:40:07 2011 +0200
     1.2 +++ b/src/video/quartz/SDL_QuartzVideo.m	Sun Jul 17 01:03:13 2011 -0700
     1.3 @@ -1252,7 +1252,7 @@
     1.4       * Always get latest bitmap address and rowbytes for the screen surface;
     1.5       *  they can change dynamically (user has multiple monitors, etc).
     1.6       */
     1.7 -    if (surface == SDL_VideoSurface) {
     1.8 +    if ((surface == SDL_VideoSurface) && (surface->flags & SDL_HWSURFACE)) {
     1.9          surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
    1.10          surface->pitch  = CGDisplayBytesPerRow (kCGDirectMainDisplay);
    1.11          return (surface->pixels != NULL);