Skip to content
Snippets Groups Projects
Commit d449eee3 authored by Sven Schnelle's avatar Sven Schnelle Committed by Helge Deller
Browse files

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: default avatarSven Schnelle <svens@stackframe.org>
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
Cc: qemu-stable@nongnu.org
Signed-off-by: default avatarHelge Deller <deller@gmx.de>
parent 3615cea4
No related branches found
No related tags found
No related merge requests found
......@@ -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)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment