diff options
| author | ad <ad@NetBSD.org> | 1999-08-31 10:11:52 +0000 |
|---|---|---|
| committer | ad <ad@NetBSD.org> | 1999-08-31 10:11:52 +0000 |
| commit | 78d4510ba03323c40cdae4e6f56548a54c55b84d (patch) | |
| tree | 02f409ff9a744162e852fff3ef7b19b2f8595263 /sys/dev/rasops | |
| parent | 2806df576ce6e927ec599f4311116fa0d47c9cd3 (diff) | |
Pass color value through ri->ri_devcmap before writing.
Diffstat (limited to 'sys/dev/rasops')
| -rw-r--r-- | sys/dev/rasops/rasops1.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sys/dev/rasops/rasops1.c b/sys/dev/rasops/rasops1.c index 337796647a9..5d7813fdda6 100644 --- a/sys/dev/rasops/rasops1.c +++ b/sys/dev/rasops/rasops1.c @@ -1,4 +1,4 @@ -/* $NetBSD: rasops1.c,v 1.8 1999/08/20 06:46:44 mouse Exp $ */ +/* $NetBSD: rasops1.c,v 1.9 1999/08/31 10:11:52 ad Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. @@ -38,7 +38,7 @@ #include "opt_rasops.h" #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.8 1999/08/20 06:46:44 mouse Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rasops1.c,v 1.9 1999/08/31 10:11:52 ad Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -121,8 +121,8 @@ rasops1_putchar(cookie, row, col, uc, attr) col = col & 31; rs = ri->ri_stride; - bg = (attr & 0x000f0000) ? 0xffffffff : 0; - fg = (attr & 0x0f000000) ? 0xffffffff : 0; + bg = (attr & 0x000f0000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; + fg = (attr & 0x0f000000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; /* If fg and bg match this becomes a space character */ if (fg == bg || uc == ' ') { @@ -264,8 +264,8 @@ rasops1_putchar8(cookie, row, col, uc, attr) height = ri->ri_font->fontheight; rs = ri->ri_stride; - bg = (attr & 0x000f0000) ? 0xff : 0; - fg = (attr & 0x0f000000) ? 0xff : 0; + bg = (attr & 0x000f0000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; + fg = (attr & 0x0f000000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; /* If fg and bg match this becomes a space character */ if (fg == bg || uc == ' ') { @@ -330,9 +330,9 @@ rasops1_putchar16(cookie, row, col, uc, attr) height = ri->ri_font->fontheight; rs = ri->ri_stride; - bg = (attr & 0x000f0000) ? 0xffff : 0; - fg = (attr & 0x0f000000) ? 0xffff : 0; - + bg = (attr & 0x000f0000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; + fg = (attr & 0x0f000000) ? ri->ri_devcmap[1] : ri->ri_devcmap[0]; + /* If fg and bg match this becomes a space character */ if (fg == bg || uc == ' ') { while (height--) { |
