From 0c8f676747e6cd37cabb7e4a3b086789dea05571 Mon Sep 17 00:00:00 2001 From: Toni Wilen Date: Sun, 14 May 2023 20:32:27 +0300 Subject: [PATCH] Fix horizontal offset in bitplanes if bitplane was active behind left horizontal blanking. --- drawing.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drawing.cpp b/drawing.cpp index 91ec019c..e3968aa9 100644 --- a/drawing.cpp +++ b/drawing.cpp @@ -3671,6 +3671,10 @@ static void do_color_changes(line_draw_func worker_border, line_draw_func worker if (nextpos_in_range > lastpos && lastpos < playfield_start) { int t = nextpos_in_range <= playfield_start ? nextpos_in_range : playfield_start; (*worker_border)(lastpos, t, 0); + // if playfield starts before hblank end: adjust back to playfield start + if (t > playfield_start) { + t = playfield_start; + } lastpos = t; } -- 2.47.3