[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH v2 6/6] hw/display/artist: Fix draw_line() artefacts
From: |
Helge Deller |
Subject: |
[PATCH v2 6/6] hw/display/artist: Fix draw_line() artefacts |
Date: |
Mon, 31 Jan 2022 22:35:29 +0100 |
From: Sven Schnelle <svens@stackframe.org>
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>
---
hw/display/artist.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/hw/display/artist.c b/hw/display/artist.c
index 8a9fa482d0..1d877998b9 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)
--
2.34.1
- [PATCH v2 0/6] Fixes and updates for hppa target, Helge Deller, 2022/01/31
- [PATCH v2 6/6] hw/display/artist: Fix draw_line() artefacts,
Helge Deller <=
- [PATCH v2 5/6] hw/display/artist: Mouse cursor fixes for HP-UX, Helge Deller, 2022/01/31
- [PATCH v2 3/6] hppa: Add support for an emulated TOC/NMI button., Helge Deller, 2022/01/31
- [PATCH v2 2/6] hw/hppa: Allow up to 16 emulated CPUs, Helge Deller, 2022/01/31
- [PATCH v2 4/6] hw/display/artist: rewrite vram access mode handling, Helge Deller, 2022/01/31
- [PATCH v2 1/6] seabios-hppa: Update SeaBIOS-hppa to VERSION 3, Helge Deller, 2022/01/31