src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 5568 abe7d0b3539b
parent 5550 80ae1ac3bdc9
child 5569 d81e8404bd7f
equal deleted inserted replaced
5565:4225f09eb8cb 5568:abe7d0b3539b
  1250 {
  1250 {
  1251     /*
  1251     /*
  1252      * Always get latest bitmap address and rowbytes for the screen surface;
  1252      * Always get latest bitmap address and rowbytes for the screen surface;
  1253      *  they can change dynamically (user has multiple monitors, etc).
  1253      *  they can change dynamically (user has multiple monitors, etc).
  1254      */
  1254      */
  1255     if (surface == SDL_VideoSurface) {
  1255     if ((surface == SDL_VideoSurface) && (surface->flags & SDL_HWSURFACE)) {
  1256         surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
  1256         surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
  1257         surface->pitch  = CGDisplayBytesPerRow (kCGDirectMainDisplay);
  1257         surface->pitch  = CGDisplayBytesPerRow (kCGDirectMainDisplay);
  1258         return (surface->pixels != NULL);
  1258         return (surface->pixels != NULL);
  1259     }
  1259     }
  1260 
  1260