comparison src/video/quartz/SDL_QuartzVideo.m @ 1219:9a7a016d5a71

Quartz driver: Correctly handle SDL_DOUBLEBUF|SDL_FULLSCREEN when the resolution is too small and thus emulated by SDL. Fixes http://www.devolution.com/pipermail/sdl/2005-December/071765.html ...
author Ryan C. Gordon <icculus@icculus.org>
date Mon, 02 Jan 2006 12:37:40 +0000
parents 057d313e36a2
children ca2f0da7b708
comparison
equal deleted inserted replaced
1218:057d313e36a2 1219:9a7a016d5a71
973 973
974 SDL_SemWait (sem1); 974 SDL_SemWait (sem1);
975 if (quit_thread) 975 if (quit_thread)
976 return 0; 976 return 0;
977 977
978 dst = CGDisplayBaseAddress (display_id); 978 /*
979 src = current_buffer; 979 * We have to add SDL_VideoSurface->offset here, since we might be a
980 * smaller surface in the center of the framebuffer (you asked for
981 * a fullscreen resolution smaller than the hardware could supply
982 * so SDL is centering it in a bigger resolution)...
983 */
984 dst = CGDisplayBaseAddress (display_id) + SDL_VideoSurface->offset;
985 src = current_buffer + SDL_VideoSurface->offset;
980 len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel; 986 len = SDL_VideoSurface->w * SDL_VideoSurface->format->BytesPerPixel;
981 h = SDL_VideoSurface->h; 987 h = SDL_VideoSurface->h;
982 skip = SDL_VideoSurface->pitch; 988 skip = SDL_VideoSurface->pitch;
983 989
984 /* Wait for the VBL to occur (estimated since we don't have a hardware interrupt) */ 990 /* Wait for the VBL to occur (estimated since we don't have a hardware interrupt) */