Update of /cvsroot/gc-linux/libsdl/src/video/gc
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2754/src/video/gc
Modified Files:
SDL_gcvideo.c
Log Message:
Clear the upper and lower bands in pal50 mode.
Index: SDL_gcvideo.c
===================================================================
RCS file: /cvsroot/gc-linux/libsdl/src/video/gc/SDL_gcvideo.c,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -d -r1.1.1.1 -r1.2
--- SDL_gcvideo.c 23 Jun 2005 18:18:33 -0000 1.1.1.1
+++ SDL_gcvideo.c 23 Jun 2005 19:08:16 -0000 1.2
@@ -74,6 +74,9 @@
static void GC_UpdateRectRGB24(_THIS, SDL_Rect * rect, int pitch);
static void GC_UpdateRectRGB32(_THIS, SDL_Rect * rect, int pitch);
+
+#define GC_BLACK 0x00800080
+
/* GC driver bootstrap functions */
static int GC_Available(void)
@@ -369,6 +372,7 @@
Uint32 Rmask;
Uint32 Gmask;
Uint32 Bmask;
+ Uint32 *p, *q;
GC_DPRINTF("Setting %dx%d %dbpp mode\n", width, height, bpp);
@@ -393,6 +397,17 @@
/* hack to center 640x480 resolution on PAL cubes */
if (vinfo.xres == 640 && vinfo.yres == 576) {
mapped_offset = ((576 - 480) / 2) * 640 * ((bpp + 7) / 8);
+
+ p = (Uint32 *)mapped_mem;
+ q = (Uint32 *)(mapped_mem + mapped_offset);
+ while (p < q)
+ *p++ = GC_BLACK;
+
+ q = (Uint32 *)(mapped_mem + mapped_memlen);
+ p = (Uint32 *)(mapped_mem + mapped_memlen - mapped_offset);
+ while (p < q)
+ *p++ = GC_BLACK;
+
} else {
mapped_offset = 0;
}
@@ -626,7 +641,7 @@
/* fast path, thanks to bohdy */
if (!(rgb1 | rgb2)) {
- return 0x10801080; /* black, black */
+ return GC_BLACK; /* black, black */
}
if (rgb1 == rgb2) {
@@ -855,7 +870,7 @@
int left =
(_this->screen->pitch * _this->screen->h) / sizeof(Uint32);
while (left--) {
- *rowp++ = 0x00800080;
+ *rowp++ = GC_BLACK;
}
if (_this->screen->pixels != NULL) {
/* already freed above */
|