Commit 01e47947 authored by Patrice Mandin's avatar Patrice Mandin

Revert back screen centering when using c2p

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401102
parent a8056c8f
...@@ -724,8 +724,17 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -724,8 +724,17 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
surface = this->screen; surface = this->screen;
if ((surface->format->BitsPerPixel) == 8) { if ((surface->format->BitsPerPixel) == 8) {
void *destscr;
int destx;
int i; 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;i<numrects;i++) { for (i=0;i<numrects;i++) {
void *source,*destination; void *source,*destination;
int x1,x2; int x1,x2;
...@@ -740,16 +749,19 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -740,16 +749,19 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
source += surface->pitch * rects[i].y; source += surface->pitch * rects[i].y;
source += x1; source += x1;
destination = XBIOS_screens[XBIOS_fbnum]; destination = destscr;
destination += XBIOS_pitch * rects[i].y; destination += XBIOS_pitch * rects[i].y;
destination += x1; destination += x1;
/* Convert chunky to planar screen */ /* Convert chunky to planar screen */
SDL_Atari_C2pConvert( SDL_Atari_C2pConvert(
source, destination, source,
x2-x1, rects[i].h, destination,
x2-x1,
rects[i].h,
XBIOS_doubleline, XBIOS_doubleline,
surface->pitch, XBIOS_pitch surface->pitch,
XBIOS_pitch
); );
} }
} }
...@@ -770,12 +782,25 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects) ...@@ -770,12 +782,25 @@ static void XBIOS_UpdateRects(_THIS, int numrects, SDL_Rect *rects)
static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface) static int XBIOS_FlipHWSurface(_THIS, SDL_Surface *surface)
{ {
if ((surface->format->BitsPerPixel) == 8) { if ((surface->format->BitsPerPixel) == 8) {
void *destscr;
int destx;
/* 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;
/* Convert chunky to planar screen */ /* Convert chunky to planar screen */
SDL_Atari_C2pConvert( SDL_Atari_C2pConvert(
surface->pixels, XBIOS_screens[XBIOS_fbnum], surface->pixels,
surface->w, surface->h, destscr,
surface->w,
surface->h,
XBIOS_doubleline, XBIOS_doubleline,
surface->pitch, XBIOS_pitch surface->pitch,
XBIOS_pitch
); );
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment