src/video/quartz/SDL_QuartzVideo.m
changeset 1219 9a7a016d5a71
parent 1218 057d313e36a2
child 1220 ca2f0da7b708
--- a/src/video/quartz/SDL_QuartzVideo.m	Mon Jan 02 10:49:37 2006 +0000
+++ b/src/video/quartz/SDL_QuartzVideo.m	Mon Jan 02 12:37:40 2006 +0000
@@ -975,8 +975,14 @@
         if (quit_thread)
             return 0;
                 
-        dst = CGDisplayBaseAddress (display_id);
-        src = current_buffer;
+        /*
+         * We have to add SDL_VideoSurface->offset here, since we might be a
+         *  smaller surface in the center of the framebuffer (you asked for
+         *  a fullscreen resolution smaller than the hardware could supply
+         *  so SDL is centering it in a bigger resolution)...
+         */
+        dst = CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset;
+        src = current_buffer + SDL_VideoSurface->offset;
         len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel;
         h = SDL_VideoSurface->h;
         skip = SDL_VideoSurface->pitch;