From c7a7963da6902fde50c09b326f851dca9b7b5bb9 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Sat, 2 Dec 2006 11:24:05 +0000 Subject: Use ri_devcmap to get corrected color values, instead of directly using WSCOL_xxxx values. --- sys/dev/sbus/zx.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'sys/dev') 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); -- cgit v1.2.3