diff options
author | nyan <nyan@FreeBSD.org> | 2002-02-10 10:14:39 +0000 |
---|---|---|
committer | nyan <nyan@FreeBSD.org> | 2002-02-10 10:14:39 +0000 |
commit | bf52fb4e7a75e1730a5ba056af240fd1d59e1ad9 (patch) | |
tree | e10608bc17b86f77dfa642c03bd42b67d98b0dec /sys/pc98/cbus/scgdcrndr.c | |
parent | 95edd69eb2cb81170c95d6de7cb5b8a4816319e5 (diff) | |
download | FreeBSD-src-bf52fb4e7a75e1730a5ba056af240fd1d59e1ad9.zip FreeBSD-src-bf52fb4e7a75e1730a5ba056af240fd1d59e1ad9.tar.gz |
Fixed mouse cursor on a console.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/pc98/cbus/scgdcrndr.c')
-rw-r--r-- | sys/pc98/cbus/scgdcrndr.c | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/sys/pc98/cbus/scgdcrndr.c b/sys/pc98/cbus/scgdcrndr.c index 3b863e2..292aba7 100644 --- a/sys/pc98/cbus/scgdcrndr.c +++ b/sys/pc98/cbus/scgdcrndr.c @@ -117,10 +117,15 @@ gdc_txtdraw(scr_stat *scp, int from, int count, int flip) count = scp->xsize*scp->ysize - from; if (flip) { - p = sc_vtb_pointer(&scp->scr, from); - for (; count-- > 0; ++from) { + for (p = sc_vtb_pointer(&scp->scr, from); count-- > 0; ++from) { c = sc_vtb_getc(&scp->vtb, from); - a = sc_vtb_geta(&scp->vtb, from) ^ 0x0800; + a = sc_vtb_geta(&scp->vtb, from); +#if 0 + a ^= 0x0800; +#else + a = (a & 0x8800) | ((a & 0x7000) >> 4) + | ((a & 0x0700) << 4); +#endif p = sc_vtb_putchar(&scp->scr, p, c, a); } } else { @@ -160,11 +165,17 @@ static void draw_txtmouse(scr_stat *scp, int x, int y) { int at; + int a; at = (y/scp->font_size - scp->yoff)*scp->xsize + x/8 - scp->xoff; - sc_vtb_putc(&scp->scr, at, - sc_vtb_getc(&scp->scr, at), - sc_vtb_geta(&scp->vtb, at) ^ 0x0800); + a = sc_vtb_geta(&scp->vtb, at); +#if 0 + a ^= 0x0800; +#else + a = (a & 0x8800) | ((a & 0x7000) >> 4) + | ((a & 0x0700) << 4); +#endif + sc_vtb_putc(&scp->scr, at, sc_vtb_getc(&scp->scr, at), a); } static void |