aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSven Schnelle <svens@stackframe.org>2022-01-23 16:47:47 +0100
committerHelge Deller <deller@gmx.de>2022-02-02 18:46:45 +0100
commitd449eee3af37937f788c02ad88f2caa8bbfb19aa (patch)
treeb982aafe81441e7cbf58d794b6d694dc91369832
parent3615cea4714f94d1db61bd6618a3a66a6b014f9d (diff)
downloadqemu-d449eee3af37937f788c02ad88f2caa8bbfb19aa.zip
qemu-d449eee3af37937f788c02ad88f2caa8bbfb19aa.tar.gz
qemu-d449eee3af37937f788c02ad88f2caa8bbfb19aa.tar.bz2
hw/display/artist: Fix draw_line() artefacts
The draw_line() function left artefacts on the screen because it was using the x/y variables which were incremented in the loop before. Fix it by using the unmodified x1/x2 variables instead. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de> Cc: qemu-stable@nongnu.org Signed-off-by: Helge Deller <deller@gmx.de>
-rw-r--r--hw/display/artist.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 8a9fa48..1d87799 100644
--- a/hw/display/artist.c
+++ b/hw/display/artist.c
@@ -553,10 +553,11 @@ static void draw_line(ARTISTState *s,
}
x++;
} while (x <= x2 && (max_pix == -1 || --max_pix > 0));
+
if (c1)
- artist_invalidate_lines(buf, x, dy+1);
+ artist_invalidate_lines(buf, x1, x2 - x1);
else
- artist_invalidate_lines(buf, y, dx+1);
+ artist_invalidate_lines(buf, y1 > y2 ? y2 : y1, x2 - x1);
}
static void draw_line_pattern_start(ARTISTState *s)