Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/rasops Depth 2 is monochrome.



details:   https://anonhg.NetBSD.org/src/rev/badeef55d87d
branches:  trunk
changeset: 458701:badeef55d87d
user:      rin <rin%NetBSD.org@localhost>
date:      Wed Aug 07 10:59:51 2019 +0000

description:
Depth 2 is monochrome.

IMO, it is impossible to support ANSI colors on 2-bpp display; fore-
and background can be same value even if they are different colors
logically.

diffstat:

 sys/dev/rasops/rasops.c |  10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

diffs (32 lines):

diff -r d79df87dcdd9 -r badeef55d87d sys/dev/rasops/rasops.c
--- a/sys/dev/rasops/rasops.c   Wed Aug 07 10:55:51 2019 +0000
+++ b/sys/dev/rasops/rasops.c   Wed Aug 07 10:59:51 2019 +0000
@@ -1,4 +1,4 @@
-/*      $NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $        */
+/*      $NetBSD: rasops.c,v 1.112 2019/08/07 10:59:51 rin Exp $        */
 
 /*-
  * Copyright (c) 1999 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.111 2019/08/07 10:55:51 rin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rasops.c,v 1.112 2019/08/07 10:59:51 rin Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_rasops.h"
@@ -484,10 +484,10 @@
                    WSSCREEN_WSCOLORS | WSSCREEN_REVERSE);
 
        if ((ri->ri_flg & RI_FORCEMONO) != 0 ||
-#ifdef RASOPS_APPLE_PALETTE
-           ri->ri_depth == 1
+#ifndef RASOPS_APPLE_PALETTE
+           ri->ri_depth < 8
 #else
-           ri->ri_depth < 8
+           ri->ri_depth < 4
 #endif
        ) {
                ri->ri_ops.allocattr = rasops_allocattr_mono;



Home | Main Index | Thread Index | Old Index