diff options
| author | Sven Schnelle <svens@stackframe.org> | 2020-08-08 21:56:29 +0200 |
|---|---|---|
| committer | Helge Deller <deller@gmx.de> | 2020-08-26 23:04:00 +0200 |
| commit | f9e9f7149027906785949d49b4e4c9b9ec896203 (patch) | |
| tree | 1aecd04888ebe5928731b9e2f5609cdc12bf6569 /hw/display/artist.c | |
| parent | e0cf02ce680f11893aca9642e76d6ae68b9375af (diff) | |
| download | focaccia-qemu-f9e9f7149027906785949d49b4e4c9b9ec896203.tar.gz focaccia-qemu-f9e9f7149027906785949d49b4e4c9b9ec896203.zip | |
hw/display/artist: Fix invalidation of lines in artist_draw_line()
The old code didn't invalidate correctly when vertical lines were drawn. Fix this and move the invalidation out of the loop. Signed-off-by: Sven Schnelle <svens@stackframe.org> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'hw/display/artist.c')
| -rw-r--r-- | hw/display/artist.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/display/artist.c b/hw/display/artist.c index 44bb67bbc3..a959b2c158 100644 --- a/hw/display/artist.c +++ b/hw/display/artist.c @@ -662,7 +662,6 @@ static void draw_line(ARTISTState *s, } if (e > 0) { - artist_invalidate_lines(buf, y, 1); y += incy; e += diago; } else { @@ -670,6 +669,10 @@ 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); + else + artist_invalidate_lines(buf, y, dx+1); } static void draw_line_pattern_start(ARTISTState *s) |