From: kub Date: Thu, 6 Jul 2023 17:25:47 +0000 (+0000) Subject: sms, fix menu background scaling and position X-Git-Tag: v2.00~191 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a5aae2c39fc5f2b53bfa314c21e81229c435b706;p=picodrive.git sms, fix menu background scaling and position --- diff --git a/pico/draw.c b/pico/draw.c index 2dbba564..f6a710c5 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1944,9 +1944,9 @@ PICO_INTERNAL void PicoFrameStart(void) if (est->rendstatus != rendstatus_old || lines != rendlines) { rendlines = lines; // mode_change() might reset rendstatus_old by calling SetColorFormat + int rendstatus = est->rendstatus; emu_video_mode_change(loffs, lines, coffs, columns); - rendstatus_old = est->rendstatus & (PDRAW_BORDER_32|PDRAW_INTERLACE| - PDRAW_32X_SCALE|PDRAW_SOFTSCALE|PDRAW_32_COLS|PDRAW_30_ROWS); + rendstatus_old = rendstatus; // mode_change() might clear buffers, redraw needed est->rendstatus |= PDRAW_SYNC_NEEDED; } diff --git a/pico/mode4.c b/pico/mode4.c index b06ca58d..b56cf442 100644 --- a/pico/mode4.c +++ b/pico/mode4.c @@ -753,13 +753,14 @@ void PicoFrameStartSMS(void) } else { if ((mode & 4) && (Pico.video.reg[0] & 0x20)) { // SMS mode 4 with 1st column blanked - columns = 248; Pico.est.rendstatus |= PDRAW_SMS_BLANK_1; + columns = 248; } switch (mode) { // SMS2 only 224/240 line modes, e.g. Micro Machines case 0x06|0x08: + Pico.est.rendstatus |= PDRAW_30_ROWS; loffs = screen_offset = 0; lines = 240; break; @@ -775,9 +776,11 @@ void PicoFrameStartSMS(void) coffs = (FinalizeLineSMS == NULL && columns == 248 ? 8 : 0); if (FinalizeLineSMS != NULL && (PicoIn.opt & POPT_EN_SOFTSCALE)) { // softscaling always generates 320px, but no scaling in 8bit fast + Pico.est.rendstatus |= PDRAW_SOFTSCALE; coffs = 0; columns = 320; } else if (!(PicoIn.opt & POPT_DIS_32C_BORDER)) { + Pico.est.rendstatus |= PDRAW_BORDER_32; line_offset -= coffs; coffs = (320-columns) / 2; if (FinalizeLineSMS == NULL)