From 33f4f73eb37705732dcb15989940aca37adde605 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sun, 17 Jul 2011 01:03:13 -0700 Subject: [PATCH] Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs. --- src/video/quartz/SDL_QuartzVideo.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index c094dc730..caf33e923 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -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);