Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
rasops1 changes
Hi,
When adding wscons support for Sun's monochrome bw2 framebuffer, I noticed
that the screen colours are reversed. In other words black text on white
background, instead of white text on black. It looks like this is because
the Sun framebuffer is black foreground on a white background, and not the
expected white foreground on a black background. The attached fixes this
for me. Any comments?
Thanks,
J
PS. It looks like XFree86's sunbw2 driver also swaps black and white (XSun
is OK).
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
Index: sys/dev/rasops/rasops.c
===================================================================
RCS file: /cvsroot/src/sys/dev/rasops/rasops.c,v
retrieving revision 1.58
diff -u -r1.58 rasops.c
--- sys/dev/rasops/rasops.c 28 Apr 2008 20:23:56 -0000 1.58
+++ sys/dev/rasops/rasops.c 5 Dec 2008 14:08:28 -0000
@@ -728,8 +728,15 @@
switch (ri->ri_depth) {
case 1:
- ri->ri_devcmap[0] = 0;
- for (i = 1; i < 16; i++)
+ if (ri->ri_flg & RI_MONO_BOW) {
+ ri->ri_devcmap[0] = -1;
+ ri->ri_devcmap[1] = 0;
+ }
+ else {
+ ri->ri_devcmap[0] = 0;
+ ri->ri_devcmap[1] = -1;
+ }
+ for (i = 2; i < 16; i++)
ri->ri_devcmap[i] = -1;
return;
Index: sys/dev/rasops/rasops.h
===================================================================
RCS file: /cvsroot/src/sys/dev/rasops/rasops.h,v
retrieving revision 1.22
diff -u -r1.22 rasops.h
--- sys/dev/rasops/rasops.h 28 Apr 2008 20:23:56 -0000 1.22
+++ sys/dev/rasops/rasops.h 5 Dec 2008 14:08:28 -0000
@@ -44,6 +44,7 @@
#define RI_CURSORCLIP 0x40 /* cursor is currently clipped */
#define RI_CFGDONE 0x80 /* rasops_reconfig() completed successfully */
#define RI_ROTATE_CW 0x100 /* display is rotated, quarter clockwise */
+#define RI_MONO_BOW 0x200 /* display is mono, black on white */
struct rasops_info {
/* These must be filled in by the caller */
- - 8< - - - - - - - - - - - - - Cut here - - - - - - - - - - - - - >8 - -
--
My other computer also runs NetBSD / Sailing at Newbiggin
http://www.netbsd.org/ / http://www.newbigginsailingclub.org/
Home |
Main Index |
Thread Index |
Old Index