X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fdraw.c;h=a03d8873a8734a5143af2ce87287f37b6d0fb235;hb=01685eefb022ab2d13cc154a43807e9d20c77c03;hp=d14e99689328b746f80ed254bd5712e65bdf87ea;hpb=cff531af94bd9c9c89ae162e80f48ddc26a4e504;p=picodrive.git diff --git a/pico/draw.c b/pico/draw.c index d14e996..a03d887 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1424,11 +1424,6 @@ PICO_INTERNAL void PicoFrameStart(void) lines = 240; } - HighCol = HighColBase + offs * HighColIncrement; - DrawLineDest = (char *)DrawLineDestBase + offs * DrawLineDestIncrement; - DrawScanline = 0; - skip_next_line = 0; - if (rendstatus != rendstatus_old || lines != rendlines) { rendlines = lines; // mode_change() might reset rendstatus_old by calling SetColorFormat @@ -1437,6 +1432,11 @@ PICO_INTERNAL void PicoFrameStart(void) rendstatus_old = rendstatus; } + HighCol = HighColBase + offs * HighColIncrement; + DrawLineDest = (char *)DrawLineDestBase + offs * DrawLineDestIncrement; + DrawScanline = 0; + skip_next_line = 0; + if (PicoOpt & POPT_ALT_RENDERER) return; @@ -1457,6 +1457,9 @@ static void DrawBlankedLine(int line, int offs, int sh, int bgc) if (PicoScanEnd != NULL) PicoScanEnd(line + offs); + + HighCol += HighColIncrement; + DrawLineDest = (char *)DrawLineDest + DrawLineDestIncrement; } static void PicoLine(int line, int offs, int sh, int bgc) @@ -1505,19 +1508,9 @@ void PicoDrawSync(int to, int blank_last_line) for (line = DrawScanline; line < to; line++) { -#if !CAN_HANDLE_240_LINES - if (line >= 224) break; -#endif PicoLine(line, offs, sh, bgc); } -#if !CAN_HANDLE_240_LINES - if (line >= 224) { - DrawScanline = 240; - return; - } -#endif - // last line if (line <= to) { @@ -1546,7 +1539,7 @@ void PicoDrawUpdateHighPal(void) } } -void PicoDrawSetOutFormat(pdso_t which, int allow_32x) +void PicoDrawSetOutFormat(pdso_t which, int use_32x_line_mode) { switch (which) { @@ -1555,7 +1548,7 @@ void PicoDrawSetOutFormat(pdso_t which, int allow_32x) break; case PDF_RGB555: - if ((PicoAHW & PAHW_32X) && allow_32x) + if ((PicoAHW & PAHW_32X) && use_32x_line_mode) FinalizeLine = FinalizeLine32xRGB555; else FinalizeLine = FinalizeLine555; @@ -1565,6 +1558,7 @@ void PicoDrawSetOutFormat(pdso_t which, int allow_32x) FinalizeLine = NULL; break; } + PicoDrawSetOutFormat32x(which, use_32x_line_mode); PicoDrawSetOutputMode4(which); rendstatus_old = -1; }