From: Albert H. <he...@us...> - 2006-03-21 22:37:07
|
Update of /cvsroot/gc-linux/libsdl/src/video/gc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17380/src/video/gc Modified Files: SDL_gcvideo.c Log Message: Do not modify the yres, even on PAL mode. We want the yres equal to the actual physical screen mode. Make sure video page 0 is both the visible and back page when no double-buffering is enabled. Index: SDL_gcvideo.c =================================================================== RCS file: /cvsroot/gc-linux/libsdl/src/video/gc/SDL_gcvideo.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- SDL_gcvideo.c 17 Mar 2006 22:32:02 -0000 1.3 +++ SDL_gcvideo.c 21 Mar 2006 22:36:38 -0000 1.4 @@ -439,8 +439,9 @@ vinfo.bits_per_pixel = bpp; vinfo.xres = width; vinfo.xres_virtual = width; - vinfo.yres = height; - vinfo.yres_virtual = 2*height; + /* do not modify yres*, we use a fake 640x480 mode in PAL */ + //vinfo.yres = height; + //vinfo.yres_virtual = 2*height; vinfo.xoffset = 0; vinfo.yoffset = 0; vinfo.red.length = vinfo.red.offset = 0; @@ -456,7 +457,7 @@ int maxheight; /* Figure out how much video memory is available */ - maxheight = 2*height; + maxheight = 2*yres; if (vinfo.yres_virtual > maxheight) { vinfo.yres_virtual = maxheight; } @@ -514,12 +515,16 @@ page_address[0] = mapped_mem; page_address[1] = mapped_mem + current->pitch * yres; - back_page = 0; + back_page = 1; if (flags & SDL_DOUBLEBUF) { current->flags |= SDL_DOUBLEBUF; flip_pending = 1; } else { flip_pending = 0; + /* make page 0 both the visible and back page */ + back_page = ioctl(console_fd, FBIOFLIPHACK, &back_page); + if (back_page < 0) + back_page = 0; } /* Set the update rectangle function */ |