# HG changeset patch # User Sam Lantinga # Date 1016820716 0 # Node ID bff64eba77214b2983f53504337f8407275b3089 # Parent 67ad846ed21c6b376a6d2c613d64f847819e9054 *** empty log message *** diff -r 67ad846ed21c -r bff64eba7721 README.MiNT --- a/README.MiNT Wed Mar 20 02:37:44 2002 +0000 +++ b/README.MiNT Fri Mar 22 18:11:56 2002 +0000 @@ -110,4 +110,4 @@ -- Patrice Mandin -http://www.multimania.com/pmandin +http://membres.lycos.fr/pmandin/ diff -r 67ad846ed21c -r bff64eba7721 src/video/xbios/SDL_xbios.c --- a/src/video/xbios/SDL_xbios.c Wed Mar 20 02:37:44 2002 +0000 +++ b/src/video/xbios/SDL_xbios.c Fri Mar 22 18:11:56 2002 +0000 @@ -619,10 +619,58 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) { SDL_Surface *surface; - + surface = this->screen; - XBIOS_FlipHWSurface(this, surface); + if ((surface->format->BitsPerPixel) == 8) { + void *destscr; + int destx; + int i; + + /* Center on destination screen */ + destscr = XBIOS_screens[XBIOS_fbnum]; + destscr += XBIOS_pitch * ((XBIOS_height - surface->h) >> 1); + destx = (XBIOS_width - surface->w) >> 1; + destx &= ~15; + destscr += destx; + + for (i=0;ipixels; + source += surface->pitch * rects[i].y; + source += x1; + + destination = destscr; + destination += XBIOS_pitch * rects[i].y; + destination += x1; + + /* Convert chunky to planar screen */ + Atari_C2pConvert( + source, + destination, + x2-x1, + rects[i].h, + XBIOS_doubleline, + surface->pitch, + XBIOS_pitch + ); + } + } + + Setscreen(-1,XBIOS_screens[XBIOS_fbnum],-1); + Vsync(); + + if ((surface->flags & SDL_DOUBLEBUF) == SDL_DOUBLEBUF) { + XBIOS_fbnum ^= 1; + if ((surface->format->BitsPerPixel) > 8) { + surface->pixels=XBIOS_screens[XBIOS_fbnum]; + } + } } static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)