X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=pico%2Fdraw.c;h=1781b9eaa211700b233d375748ee8e8e56e244cf;hb=e51e5983fe5cac8486df76bf349bde8aa23d1e5d;hp=168a6ea98a2c440a25b52e2e760d642eae3c65a0;hpb=5a68108691ed5685682ce133aa0bcf6015c0afd8;p=picodrive.git diff --git a/pico/draw.c b/pico/draw.c index 168a6ea..1781b9e 100644 --- a/pico/draw.c +++ b/pico/draw.c @@ -1566,10 +1566,12 @@ void PicoDrawSetOutFormat(pdso_t which, int allow_32x) rendstatus_old = -1; } +// note: may be called on the middle of frame void PicoDrawSetOutBuf(void *dest, int increment) { DrawLineDestBase = dest; DrawLineDestIncrement = increment; + DrawLineDest = DrawLineDestBase + DrawScanline * increment; } void PicoDrawSetInternalBuf(void *dest, int increment) @@ -1577,6 +1579,7 @@ void PicoDrawSetInternalBuf(void *dest, int increment) if (dest != NULL) { HighColBase = dest; HighColIncrement = increment; + HighCol = HighColBase + DrawScanline * increment; } else { HighColBase = DefHighCol;