32x: various gfx related bugfixes
[picodrive.git] / pico / draw.c
index 168a6ea..1781b9e 100644 (file)
@@ -1566,10 +1566,12 @@ void PicoDrawSetOutFormat(pdso_t which, int allow_32x)
   rendstatus_old = -1;\r
 }\r
 \r
+// note: may be called on the middle of frame\r
 void PicoDrawSetOutBuf(void *dest, int increment)\r
 {\r
   DrawLineDestBase = dest;\r
   DrawLineDestIncrement = increment;\r
+  DrawLineDest = DrawLineDestBase + DrawScanline * increment;\r
 }\r
 \r
 void PicoDrawSetInternalBuf(void *dest, int increment)\r
@@ -1577,6 +1579,7 @@ void PicoDrawSetInternalBuf(void *dest, int increment)
   if (dest != NULL) {\r
     HighColBase = dest;\r
     HighColIncrement = increment;\r
+    HighCol = HighColBase + DrawScanline * increment;\r
   }\r
   else {\r
     HighColBase = DefHighCol;\r