pScreen->blackPixel = pvfb->blackPixel;
pScreen->whitePixel = pvfb->whitePixel;
- if (!pvfb->pixelFormatDefined && pvfb->fb.depth == 16) {
+ if (!pvfb->pixelFormatDefined) {
pvfb->pixelFormatDefined = TRUE;
- pvfb->rgbNotBgr = TRUE;
- pvfb->blueBits = pvfb->redBits = 5;
- pvfb->greenBits = 6;
+
+ switch (pvfb->fb.depth) {
+ case 16:
+ pvfb->rgbNotBgr = TRUE;
+ pvfb->blueBits = pvfb->redBits = 5;
+ pvfb->greenBits = 6;
+ break;
+ case 32:
+ pvfb->rgbNotBgr = TRUE;
+ pvfb->blueBits = pvfb->redBits = pvfb->greenBits = 8;
+ break;
+ }
}
-
+
if (pvfb->pixelFormatDefined) {
VisualPtr vis = pScreen->visuals;
for (int i = 0; i < pScreen->numVisuals; i++) {