summaryrefslogtreecommitdiff
path: root/sys/dev/rasops
diff options
context:
space:
mode:
authorad <ad@NetBSD.org>1999-06-15 22:34:45 +0000
committerad <ad@NetBSD.org>1999-06-15 22:34:45 +0000
commit10b0c75443a8fdf44fdde094a3afd5a44da1306d (patch)
tree3897daf9a201475a278b736aabbc6dbb92ff7653 /sys/dev/rasops
parent0486add12733de28f98c03c6aaf7fc59539f3fb6 (diff)
- Don't even try to emulate WSATTR_HILIT on mono displays
- WSATTR_REVERSE is a capability of both mono/color
Diffstat (limited to 'sys/dev/rasops')
-rw-r--r--sys/dev/rasops/rasops.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c
index 821cd36c3dd..5b7eef8b5f9 100644
--- a/sys/dev/rasops/rasops.c
+++ b/sys/dev/rasops/rasops.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rasops.c,v 1.10 1999/06/15 21:34:05 ad Exp $ */
+/* $NetBSD: rasops.c,v 1.11 1999/06/15 22:34:45 ad Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.10 1999/06/15 21:34:05 ad Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.11 1999/06/15 22:34:45 ad Exp $");
#include "rasops_glue.h"
@@ -54,6 +54,10 @@ __KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.10 1999/06/15 21:34:05 ad Exp $");
#include <dev/wsfont/wsfont.h>
#include <dev/rasops/rasops.h>
+#ifndef _KERNEL
+#include <errno.h>
+#endif
+
/* ANSI colormap (R,G,B). Upper 8 are high-intensity */
u_char rasops_cmap[256*3] = {
0x00, 0x00, 0x00, /* black */
@@ -255,11 +259,11 @@ rasops_setfont(ri, wantrows, wantcols, clear, center)
if (ri->ri_depth < 8 || ri->ri_forcemono) {
ri->ri_ops.alloc_attr = rasops_alloc_mattr;
- ri->ri_caps = WSATTR_UNDERLINE;
+ ri->ri_caps = WSATTR_UNDERLINE | WSATTR_REVERSE;
} else {
ri->ri_ops.alloc_attr = rasops_alloc_cattr;
ri->ri_caps = WSATTR_UNDERLINE | WSATTR_HILIT |
- WSATTR_WSCOLORS;
+ WSATTR_WSCOLORS | WSATTR_REVERSE;
}
switch (ri->ri_depth) {
@@ -402,7 +406,7 @@ rasops_alloc_mattr(cookie, fg, bg, flg, attr)
if (flg & WSATTR_BLINK)
return (EINVAL);
- if (!(flg & WSATTR_REVERSE) ^ !(flg & WSATTR_HILIT)) {
+ if ((flg & WSATTR_REVERSE) != 0) {
swap = fg;
fg = bg;
bg = swap;