summaryrefslogtreecommitdiff
path: root/sys/dev/sbus
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2006-12-02 11:24:05 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2006-12-02 11:24:05 +0000
commitc7a7963da6902fde50c09b326f851dca9b7b5bb9 (patch)
tree7bd796a0aafbeff2b8a33243b4572d3922896985 /sys/dev/sbus
parent47be3564bc984482f5c3dcbe44140cce633080b0 (diff)
Use ri_devcmap to get corrected color values, instead of directly using
WSCOL_xxxx values.
Diffstat (limited to 'sys/dev/sbus')
-rw-r--r--sys/dev/sbus/zx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/dev/sbus/zx.c b/sys/dev/sbus/zx.c
index 73776e4c8c8..66da5f319ae 100644
--- a/sys/dev/sbus/zx.c
+++ b/sys/dev/sbus/zx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: zx.c,v 1.9 2006/11/29 19:08:23 miod Exp $ */
+/* $OpenBSD: zx.c,v 1.10 2006/12/02 11:24:04 miod Exp $ */
/* $NetBSD: zx.c,v 1.5 2002/10/02 16:52:46 thorpej Exp $ */
/*
@@ -625,7 +625,7 @@ zx_fillrect(struct rasops_info *ri, int x, int y, int w, int h, long attr,
;
SETREG(zd->zd_rop, rop);
- SETREG(zd->zd_fg, bg << 24);
+ SETREG(zd->zd_fg, ri->ri_devcmap[bg] << 24);
SETREG(zc->zc_extent, ZX_COORDS(w, h));
SETREG(zc->zc_fill, ZX_COORDS(x, y) | ZX_EXTENT_DIR_BACKWARDS);
}
@@ -709,7 +709,7 @@ zx_eraserows(void *cookie, int row, int num, long attr)
;
SETREG(zd->zd_rop, ZX_STD_ROP);
- SETREG(zd->zd_fg, bg << 24);
+ SETREG(zd->zd_fg, ri->ri_devcmap[bg] << 24);
SETREG(zc->zc_extent,
ZX_COORDS(ri->ri_width - 1, ri->ri_height - 1));
SETREG(zc->zc_fill, ZX_COORDS(0, 0) | ZX_EXTENT_DIR_BACKWARDS);
@@ -752,6 +752,8 @@ zx_putchar(void *cookie, int row, int col, u_int uc, long attr)
ri = (struct rasops_info *)cookie;
font = ri->ri_font;
ri->ri_ops.unpack_attr(cookie, attr, &fg, &bg, &ul);
+ fg = ri->ri_devcmap[fg];
+ bg = ri->ri_devcmap[bg];
dp = (volatile u_int32_t *)ri->ri_bits +
ZX_COORDS(col * font->fontwidth, row * font->fontheight);