Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-3]: src/sys/dev/wscons Pull up revision 1.20 (requested by martin...



details:   https://anonhg.NetBSD.org/src/rev/89ed0b710eaa
branches:  netbsd-3
changeset: 576013:89ed0b710eaa
user:      tron <tron%NetBSD.org@localhost>
date:      Tue Jun 07 17:20:37 2005 +0000

description:
Pull up revision 1.20 (requested by martin in ticket #374):
If the driver supports reverse, try that first - even on color displays.
This removes a XXX and makes us independent of the users default colors.

diffstat:

 sys/dev/wscons/wsemul_sun.c |  15 +++++++--------
 1 files changed, 7 insertions(+), 8 deletions(-)

diffs (39 lines):

diff -r 6fdbb88d3498 -r 89ed0b710eaa sys/dev/wscons/wsemul_sun.c
--- a/sys/dev/wscons/wsemul_sun.c       Tue Jun 07 17:19:16 2005 +0000
+++ b/sys/dev/wscons/wsemul_sun.c       Tue Jun 07 17:20:37 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: wsemul_sun.c,v 1.19 2004/08/03 11:16:30 he Exp $ */
+/* $NetBSD: wsemul_sun.c,v 1.19.10.1 2005/06/07 17:20:37 tron Exp $ */
 
 /*
  * Copyright (c) 1996, 1997 Christopher G. Demetriou.  All rights reserved.
@@ -33,7 +33,7 @@
 /* XXX DESCRIPTION/SOURCE OF INFORMATION */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.19 2004/08/03 11:16:30 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: wsemul_sun.c,v 1.19.10.1 2005/06/07 17:20:37 tron Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -197,15 +197,14 @@
 
        edp->cbcookie = cbcookie;
 
-       /* XXX This assumes that the default attribute is wob. */
-       if ((!(edp->scrcapabilities & WSSCREEN_WSCOLORS) ||
+       if ((!(edp->scrcapabilities & WSSCREEN_REVERSE) ||
+               (*edp->emulops->allocattr)(edp->emulcookie, 0, 0,
+                                          WSATTR_REVERSE,
+                                          &edp->bowattr)) &&
+           (!(edp->scrcapabilities & WSSCREEN_WSCOLORS) ||
                (*edp->emulops->allocattr)(edp->emulcookie,
                                           WSCOL_BLACK, WSCOL_WHITE,
                                           WSATTR_WSCOLORS,
-                                          &edp->bowattr)) &&
-           (!(edp->scrcapabilities & WSSCREEN_REVERSE) ||
-               (*edp->emulops->allocattr)(edp->emulcookie, 0, 0,
-                                          WSATTR_REVERSE,
                                           &edp->bowattr)))
                edp->bowattr = edp->defattr;
 



Home | Main Index | Thread Index | Old Index