Home | Info | Community | Development | myReactOS | Contact Us
Definition at line 193 of file palette.c.
{ BYTE ajClutSpace[MAX_CLUT_SIZE]; PVIDEO_CLUT pScreenClut; ULONG ulReturnedDataLength; ULONG cColors; PVIDEO_CLUTDATA pScreenClutData; if (ppdev->ulBitCount == 8) { // // Fill in pScreenClut header info: // pScreenClut = (PVIDEO_CLUT) ajClutSpace; pScreenClut->NumEntries = 256; pScreenClut->FirstEntry = 0; // // Copy colours in: // cColors = 256; pScreenClutData = (PVIDEO_CLUTDATA) (&(pScreenClut->LookupTable[0])); while(cColors--) { pScreenClutData[cColors].Red = ppdev->pPal[cColors].peRed >> ppdev->cPaletteShift; pScreenClutData[cColors].Green = ppdev->pPal[cColors].peGreen >> ppdev->cPaletteShift; pScreenClutData[cColors].Blue = ppdev->pPal[cColors].peBlue >> ppdev->cPaletteShift; pScreenClutData[cColors].Unused = 0; } // // Set palette registers: // if (EngDeviceIoControl(ppdev->hDriver, IOCTL_VIDEO_SET_COLOR_REGISTERS, pScreenClut, MAX_CLUT_SIZE, NULL, 0, &ulReturnedDataLength)) { DISPDBG((0, "Failed bEnablePalette")); return(FALSE); } } DISPDBG((5, "Passed bEnablePalette")); return(TRUE); }