summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-01-30 20:41:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-01-30 20:41:52 +0000
commit7d01207f94714634a261e9a0454da92d8e2590b2 (patch)
tree1be57b23c3d19e9613142b179c230e71ee3a122c /sys
parent49569dffb0a8a9cc60e80a90b452ce6b45b76f24 (diff)
swap B and R in 24bpp and 32bpp modes too; tested martin@
Diffstat (limited to 'sys')
-rw-r--r--sys/arch/mac68k/dev/macfb.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/sys/arch/mac68k/dev/macfb.c b/sys/arch/mac68k/dev/macfb.c
index 5e552ed6ee8..b5fa533f1aa 100644
--- a/sys/arch/mac68k/dev/macfb.c
+++ b/sys/arch/mac68k/dev/macfb.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: macfb.c,v 1.11 2006/01/30 12:15:06 martin Exp $ */
+/* $OpenBSD: macfb.c,v 1.12 2006/01/30 20:41:51 miod Exp $ */
/* $NetBSD: macfb.c,v 1.11 2005/01/15 16:00:59 chs Exp $ */
/*
* Copyright (c) 1998 Matt DeBergalis
@@ -129,14 +129,25 @@ macfb_init(struct macfb_devconfig *dc)
ri->ri_height = dc->dc_ht;
ri->ri_hw = dc;
- /* swap B and R */
- if (ri->ri_depth == 16) {
+ /* swap B and R if necessary */
+ switch (ri->ri_depth) {
+ case 16:
ri->ri_rnum = 5;
ri->ri_rpos = 11;
ri->ri_gnum = 6;
ri->ri_gpos = 5;
ri->ri_bnum = 5;
ri->ri_bpos = 0;
+ break;
+ case 24:
+ case 32:
+ ri->ri_rnum = 8;
+ ri->ri_rpos = 16;
+ ri->ri_gnum = 8;
+ ri->ri_gpos = 8;
+ ri->ri_bnum = 8;
+ ri->ri_bpos = 0;
+ break;
}
/*