diff --git a/src/video/quartz/SDL_QuartzVideo.m b/src/video/quartz/SDL_QuartzVideo.m index 6ff8f4c3f276f5a75def9124f86c491f42dcba10..001845cfffc5d1f2f90177483af465a2520ee882 100644 --- a/src/video/quartz/SDL_QuartzVideo.m +++ b/src/video/quartz/SDL_QuartzVideo.m @@ -975,8 +975,14 @@ static int QZ_ThreadFlip (_THIS) { 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;