diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 16:34:56 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2006-01-08 16:34:56 +0000 |
commit | f3b0af6fb7bddf99bfc471aff31f81a1e801d670 (patch) | |
tree | 5646aedac4f23178dc1b616d81c5b81c8a9df825 /sys/dev/rasops/rasops.c | |
parent | ffda04f8e11564281a841a13c14f2cff2da651e4 (diff) |
Correctly initialize ri_devcmap at 4bpp.
Diffstat (limited to 'sys/dev/rasops/rasops.c')
-rw-r--r-- | sys/dev/rasops/rasops.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/sys/dev/rasops/rasops.c b/sys/dev/rasops/rasops.c index 95eec9bc38c..d15a5fd6380 100644 --- a/sys/dev/rasops/rasops.c +++ b/sys/dev/rasops/rasops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rasops.c,v 1.12 2005/09/15 20:23:10 miod Exp $ */ +/* $OpenBSD: rasops.c,v 1.13 2006/01/08 16:34:55 miod Exp $ */ /* $NetBSD: rasops.c,v 1.35 2001/02/02 06:01:01 marcus Exp $ */ /*- @@ -726,7 +726,7 @@ rasops_init_devcmap(ri) case 1: ri->ri_devcmap[0] = 0; for (i = 1; i < 16; i++) - ri->ri_devcmap[i] = -1; + ri->ri_devcmap[i] = 0xffffffff; return; case 2: @@ -735,7 +735,14 @@ rasops_init_devcmap(ri) ri->ri_devcmap[0] = 0; ri->ri_devcmap[8] = 0x55555555; - ri->ri_devcmap[15] = -1; + ri->ri_devcmap[15] = 0xffffffff; + return; + + case 4: + for (i = 0; i < 16; i++) { + c = i | (i << 4); + ri->ri_devcmap[i] = c | (c<<8) | (c<<16) | (c<<24); + } return; case 8: |