diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-18 19:17:04 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2005-01-18 19:17:04 +0000 |
commit | 920b570f3a4c4c2e768a25e386a7411a4853e0f9 (patch) | |
tree | d1b39202f35d2234509c679a182ab8cfd046ee93 /sys/arch/hp300/dev/diofb.c | |
parent | 0160f1b3a26509627bd19523a72030b92cfe5126 (diff) |
Colormap handling for topcat; Xwsfb now runs.
Diffstat (limited to 'sys/arch/hp300/dev/diofb.c')
-rw-r--r-- | sys/arch/hp300/dev/diofb.c | 27 |
1 files changed, 18 insertions, 9 deletions
diff --git a/sys/arch/hp300/dev/diofb.c b/sys/arch/hp300/dev/diofb.c index b66710dd9ac..94f2b776df8 100644 --- a/sys/arch/hp300/dev/diofb.c +++ b/sys/arch/hp300/dev/diofb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: diofb.c,v 1.3 2005/01/18 10:48:19 miod Exp $ */ +/* $OpenBSD: diofb.c,v 1.4 2005/01/18 19:17:03 miod Exp $ */ /* * Copyright (c) 2005, Miodrag Vallat @@ -206,7 +206,23 @@ diofb_fbsetup(struct diofb *fb) /* * Clear display */ - (*fb->bmv)(fb, 0, 0, 0, 0, fb->dwidth, fb->dheight, RR_CLEAR); + (*fb->bmv)(fb, 0, 0, 0, 0, fb->fbwidth, fb->fbheight, RR_CLEAR); + fb->curvisible = 0; + + /* + * Setup inverted cursor. + */ + (*fb->bmv)(fb, charX(fb, ' '), charY(fb, ' '), + fb->cblankx, fb->cblanky, fb->ftwidth, fb->ftheight, + RR_COPYINVERTED); + + /* + * Default colormap + */ + bzero(&fb->cmap, sizeof(fb->cmap)); + fb->cmap.r[1] = 0xff; + fb->cmap.g[1] = 0xff; + fb->cmap.b[1] = 0xff; strlcpy(fb->wsd.name, "std", sizeof(fb->wsd.name)); fb->wsd.ncols = fb->cols; @@ -425,13 +441,6 @@ diofb_alloc_screen(void *v, const struct wsscreen_descr *type, if (fb->nscreens > 0) return (ENOMEM); - /* - * Setup inverted cursor. - */ - (*fb->bmv)(fb, charX(fb, ' '), charY(fb, ' '), - fb->cblankx, fb->cblanky, fb->ftwidth, fb->ftheight, - RR_COPYINVERTED); - *cookiep = fb; *curxp = *curyp = 0; diofb_alloc_attr(fb, 0, 0, 0, attrp); |