summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormiod <miod@openbsd.org>2006-01-30 20:41:51 +0000
committermiod <miod@openbsd.org>2006-01-30 20:41:51 +0000
commita335a8bc756fc44d98c4dd1773b7abcf9adb7d23 (patch)
tree1c670d0258647218e4d6d74eb8f396eac8081ba7
parentRemove dead code; we should never see T_DNA here. (diff)
downloadwireguard-openbsd-a335a8bc756fc44d98c4dd1773b7abcf9adb7d23.tar.xz
wireguard-openbsd-a335a8bc756fc44d98c4dd1773b7abcf9adb7d23.zip
swap B and R in 24bpp and 32bpp modes too; tested martin@
-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;
}
/*