From: kub Date: Sun, 11 Jun 2023 21:17:50 +0000 (+0000) Subject: core, regression fix for h32 scaling X-Git-Tag: v2.00~208 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5864c4214a5b575f2c921f0857b23579c6c1ee9d;p=picodrive.git core, regression fix for h32 scaling --- diff --git a/pico/draw.c b/pico/draw.c index 7560e2a7..2dbba564 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1915,20 +1915,20 @@ PICO_INTERNAL void PicoFrameStart(void) // prepare to do this frame est->rendstatus = 0; - if ((PicoIn.AHW & PAHW_32X) && (*est->PicoOpt & POPT_ALT_RENDERER)) - est->rendstatus |= PDRAW_BORDER_32; // no scaling for fastest - else if (PicoIn.AHW & PAHW_32X) // H32 upscaling, before mixing in 32X layer - est->rendstatus |= PDRAW_32X_SCALE|PDRAW_SOFTSCALE; - else if (PicoIn.opt & POPT_EN_SOFTSCALE) - est->rendstatus |= PDRAW_SOFTSCALE; + if (PicoIn.AHW & PAHW_32X) // H32 upscaling, before mixing in 32X layer + est->rendstatus = (*est->PicoOpt & POPT_ALT_RENDERER) ? + PDRAW_BORDER_32 : PDRAW_32X_SCALE|PDRAW_SOFTSCALE; else if (!(PicoIn.opt & POPT_DIS_32C_BORDER)) est->rendstatus |= PDRAW_BORDER_32; + if ((PicoIn.opt & POPT_EN_SOFTSCALE) && !(*est->PicoOpt & POPT_ALT_RENDERER)) + est->rendstatus |= PDRAW_SOFTSCALE; + if ((est->Pico->video.reg[12] & 6) == 6) est->rendstatus |= PDRAW_INTERLACE; // interlace mode if (!(est->Pico->video.reg[12] & 1)) { est->rendstatus |= PDRAW_32_COLS; - if (est->rendstatus & PDRAW_BORDER_32) { + if (!(est->rendstatus & PDRAW_SOFTSCALE)) { columns = 256; coffs = 32; } @@ -1945,7 +1945,8 @@ PICO_INTERNAL void PicoFrameStart(void) rendlines = lines; // mode_change() might reset rendstatus_old by calling SetColorFormat emu_video_mode_change(loffs, lines, coffs, columns); - rendstatus_old = est->rendstatus & (PDRAW_INTERLACE|PDRAW_32_COLS|PDRAW_30_ROWS); + rendstatus_old = est->rendstatus & (PDRAW_BORDER_32|PDRAW_INTERLACE| + PDRAW_32X_SCALE|PDRAW_SOFTSCALE|PDRAW_32_COLS|PDRAW_30_ROWS); // mode_change() might clear buffers, redraw needed est->rendstatus |= PDRAW_SYNC_NEEDED; }