src/video/quartz/SDL_QuartzVideo.m
branchSDL-1.2
changeset 5549 b3577cec429d
parent 4442 31b0f2e06e3c
child 5550 80ae1ac3bdc9
equal deleted inserted replaced
5500:27348c0ae529 5549:b3577cec429d
  1247 }
  1247 }
  1248 #endif
  1248 #endif
  1249 
  1249 
  1250 static int  QZ_LockHWSurface(_THIS, SDL_Surface *surface)
  1250 static int  QZ_LockHWSurface(_THIS, SDL_Surface *surface)
  1251 {
  1251 {
       
  1252     /*
       
  1253      * Always get latest bitmap address and rowbytes for the screen surface;
       
  1254      *  they can change dynamically (user has multiple monitors, etc).
       
  1255      */
       
  1256     if (surface == SDL_VideoSurface) {
       
  1257         surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
       
  1258         surface->pitch  = CGDisplayBytesPerRow (kCGDirectMainDisplay);
       
  1259         return (surface->pixels != NULL);
       
  1260     }
       
  1261 
  1252     return 1;
  1262     return 1;
  1253 }
  1263 }
  1254 
  1264 
  1255 static void QZ_UnlockHWSurface(_THIS, SDL_Surface *surface)
  1265 static void QZ_UnlockHWSurface(_THIS, SDL_Surface *surface)
  1256 {
  1266 {