If RI_FORCEMONO is set in ri_flags, build ri_devcmap as if it was a 1bpp
authormiod <miod@openbsd.org>
Wed, 20 Aug 2008 18:49:12 +0000 (18:49 +0000)
committermiod <miod@openbsd.org>
Wed, 20 Aug 2008 18:49:12 +0000 (18:49 +0000)
frame buffer.

sys/dev/rasops/rasops.c

index a9ce188..719aa91 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: rasops.c,v 1.18 2008/06/26 05:42:17 ray Exp $ */
+/*     $OpenBSD: rasops.c,v 1.19 2008/08/20 18:49:12 miod Exp $        */
 /*     $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $       */
 
 /*-
@@ -735,14 +735,14 @@ rasops_init_devcmap(ri)
        int c;
 #endif
 
-       switch (ri->ri_depth) {
-#if NRASOPS1 > 0
-       case 1:
+       if (ri->ri_depth == 1 || (ri->ri_flg & RI_FORCEMONO) != 0) {
                ri->ri_devcmap[0] = 0;
                for (i = 1; i < 16; i++)
                        ri->ri_devcmap[i] = 0xffffffff;
                return;
-#endif
+       }
+
+       switch (ri->ri_depth) {
 #if NRASOPS2 > 0
        case 2:
                for (i = 1; i < 15; i++)