if (bg != pPnozz->CursorBg || fg != pPnozz->CursorFg) { pnozz_write_dac(pPnozz, DAC_INDX_HI, 0); pnozz_write_dac(pPnozz, DAC_INDX_LO, 0x40); pnozz_write_dac(pPnozz, DAC_INDX_CTL, DAC_INDX_AUTOINCR); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg >> 16) & 0xff); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg >> 8) & 0xff); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg) & 0xff); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg >> 16) & 0xff); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg >> 8) & 0xff); pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg) & 0xff); pPnozz->CursorBg = bg; pPnozz->CursorFg = fg; pnozz_read_4(pPnozz, VID_DACSYNC); }
pPnozz->Cursor.set = FB_CUR_SETCMAP; pPnozz->Cursor.cmap.red[0] = (bg & 0xff0000) >> 16; pPnozz->Cursor.cmap.green[0] = (bg & 0xff00) >> 8; pPnozz->Cursor.cmap.blue[0] = bg & 0xff; pPnozz->Cursor.cmap.red[1] = (fg & 0xff0000) >> 16; pPnozz->Cursor.cmap.green[1] = (fg & 0xff00) >> 8; pPnozz->Cursor.cmap.blue[1] = fg & 0xff; if (ioctl(pPnozz->psdp->fd, FBIOSCURSOR, &pPnozz->Cursor) == -1) xf86Msg(X_ERROR, "FB_CUR_SETCMAP failed\n");
PnozzSetCursorColors(ScrnInfoPtr pScrn, int bg, int fg){    PnozzPtr pPnozz = GET_PNOZZ_FROM_SCRN(pScrn);    if (bg != pPnozz->CursorBg || fg != pPnozz->CursorFg) {	pnozz_write_dac(pPnozz, DAC_INDX_HI, 0);	pnozz_write_dac(pPnozz, DAC_INDX_LO, 0x40);	pnozz_write_dac(pPnozz, DAC_INDX_CTL, DAC_INDX_AUTOINCR);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg >> 16) & 0xff);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg >> 8) & 0xff);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (bg) & 0xff);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg >> 16) & 0xff);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg >> 8) & 0xff);	pnozz_write_dac(pPnozz, DAC_INDX_DATA, (fg) & 0xff);	pPnozz->CursorBg = bg;	pPnozz->CursorFg = fg;	pnozz_read_4(pPnozz, VID_DACSYNC);    }}