aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshihiro Takahashi <nyan@FreeBSD.org>2002-02-10 10:14:39 +0000
committerYoshihiro Takahashi <nyan@FreeBSD.org>2002-02-10 10:14:39 +0000
commita1e56a26b3509dcd7f9e95ffed5578abd38416f8 (patch)
treee10608bc17b86f77dfa642c03bd42b67d98b0dec
parent2f47d083f258a8a46755b71fa1ae6b3e8480a71c (diff)
downloadsrc-a1e56a26b3509dcd7f9e95ffed5578abd38416f8.tar.gz
src-a1e56a26b3509dcd7f9e95ffed5578abd38416f8.zip
Fixed mouse cursor on a console.
Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Notes
Notes: svn path=/head/; revision=90464
-rw-r--r--sys/pc98/cbus/scgdcrndr.c23
-rw-r--r--sys/pc98/pc98/scgdcrndr.c23
2 files changed, 34 insertions, 12 deletions
diff --git a/sys/pc98/cbus/scgdcrndr.c b/sys/pc98/cbus/scgdcrndr.c
index 3b863e29e8c3..292aba7d7de7 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
diff --git a/sys/pc98/pc98/scgdcrndr.c b/sys/pc98/pc98/scgdcrndr.c
index 3b863e29e8c3..292aba7d7de7 100644
--- a/sys/pc98/pc98/scgdcrndr.c
+++ b/sys/pc98/pc98/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