mirror of
https://github.com/yawut/SDL.git
synced 2026-10-02 13:16:43 -05:00
Quartz: locking should only recheck CGDisplayBaseAddress() for HWSURFACEs.
--HG-- branch : SDL-1.2
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user