Skip to content

Commit

Permalink
Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURF…
Browse files Browse the repository at this point in the history
…ACEs.
  • Loading branch information
icculus committed Jul 17, 2011
1 parent 8ac7e0f commit 33f4f73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/video/quartz/SDL_QuartzVideo.m
Expand Up @@ -1252,7 +1252,7 @@ static int QZ_LockHWSurface(_THIS, SDL_Surface *surface)
* Always get latest bitmap address and rowbytes for the screen surface;
* they can change dynamically (user has multiple monitors, etc).
*/
if (surface == SDL_VideoSurface) {
if ((surface == SDL_VideoSurface) && (surface->flags & SDL_HWSURFACE)) {
surface->pixels = (void*) CGDisplayBaseAddress (kCGDirectMainDisplay);
surface->pitch = CGDisplayBytesPerRow (kCGDirectMainDisplay);
return (surface->pixels != NULL);
Expand Down

0 comments on commit 33f4f73

Please sign in to comment.