diff options
| author | Bruce Evans <bde@FreeBSD.org> | 2017-04-14 14:00:13 +0000 |
|---|---|---|
| committer | Bruce Evans <bde@FreeBSD.org> | 2017-04-14 14:00:13 +0000 |
| commit | a5126f539e292c87138597a7c499b4ac09389ee7 (patch) | |
| tree | 989e12d4044a7aef99888af56bd724fa4529fae8 /sys/dev/syscons | |
| parent | 6d4377c1aedeeab20ed505283eed9b57fcade4c9 (diff) | |
Notes
Diffstat (limited to 'sys/dev/syscons')
| -rw-r--r-- | sys/dev/syscons/scvgarndr.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index 8450deb74c9c7..9e4867b8b7e42 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -1032,6 +1032,7 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) int ymax; u_short m; int i, j, k; + uint8_t m1; line_width = scp->sc->adp->va_line_width; xoff = (x - scp->xoff*8)%8; @@ -1046,9 +1047,10 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) for (i = y, j = 0; i < ymax; ++i, ++j) { m = ~((mouse_and_mask[j] & ~mouse_or_mask[j]) >> xoff); for (k = 0; k < 2; ++k) { - if (x + 8 * k < scp->xpixel) { + m1 = m >> (8 * (1 - k)); + if (m1 != 0xff && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m >> (8 * (1 - k))); + writeb(p + k, m1); } } p += line_width; @@ -1058,9 +1060,10 @@ draw_pxlmouse_planar(scr_stat *scp, int x, int y) for (i = y, j = 0; i < ymax; ++i, ++j) { m = mouse_or_mask[j] >> xoff; for (k = 0; k < 2; ++k) { - if (x + 8 * k < scp->xpixel) { + m1 = m >> (8 * (1 - k)); + if (m1 != 0 && x + 8 * k < scp->xpixel) { readb(p + k); - writeb(p + k, m >> (8 * (1 - k))); + writeb(p + k, m1); } } p += line_width; |
