diff options
author | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-23 12:39:38 -0800 |
---|---|---|
committer | Jeremy Huddleston <jeremyhu@freedesktop.org> | 2008-12-23 12:45:55 -0800 |
commit | 932ed6e949757926a17f7efe6b0255e38efa1152 (patch) | |
tree | d13858f7386ead1b006a273fd3dd15dccb5d1ca2 | |
parent | 84f0c03418bf74188596635dcac128fc05f204ad (diff) |
XQuartz: Use depth=24 instead of FatalError if we can't figure out our depth
(cherry picked from commit 80b65c5b78d125c4ad3620b87b121c9e666299c3)
-rw-r--r-- | hw/xquartz/xpr/xprScreen.c | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/hw/xquartz/xpr/xprScreen.c b/hw/xquartz/xpr/xprScreen.c index b813727f1..da262f654 100644 --- a/hw/xquartz/xpr/xprScreen.c +++ b/hw/xquartz/xpr/xprScreen.c @@ -278,18 +278,17 @@ xprAddScreen(int index, ScreenPtr pScreen) } switch(depth) { - case -8: // broken - FatalError("Unsupported color depth %d %d\n", darwinDesiredDepth, depth); - dfb->visuals = (1 << StaticGray) | (1 << GrayScale); - dfb->preferredCVC = GrayScale; - dfb->depth = 8; - dfb->bitsPerRGB = 8; - dfb->bitsPerPixel = 8; - dfb->redMask = 0; - dfb->greenMask = 0; - dfb->blueMask = 0; - break; - case 8: // broken +// case -8: // broken +// dfb->visuals = (1 << StaticGray) | (1 << GrayScale); +// dfb->preferredCVC = GrayScale; +// dfb->depth = 8; +// dfb->bitsPerRGB = 8; +// dfb->bitsPerPixel = 8; +// dfb->redMask = 0; +// dfb->greenMask = 0; +// dfb->blueMask = 0; +// break; + case 8: // pseudo-working dfb->visuals = PseudoColorMask; dfb->preferredCVC = PseudoColor; dfb->depth = 8; @@ -309,7 +308,10 @@ xprAddScreen(int index, ScreenPtr pScreen) dfb->greenMask = 0x03e0; dfb->blueMask = 0x001f; break; - case 24: +// case 24: + default: + if(depth != 24) + ErrorF("Unsupported color depth requested. Defaulting to 24bit. (depth=%d darwinDesiredDepth=%d CGDisplaySamplesPerPixel=%d CGDisplayBitsPerSample=%d)\n", darwinDesiredDepth, depth, (int)CGDisplaySamplesPerPixel(kCGDirectMainDisplay), (int)CGDisplayBitsPerSample(kCGDirectMainDisplay)); dfb->visuals = LARGE_VISUALS; dfb->preferredCVC = TrueColor; dfb->depth = 24; @@ -319,8 +321,6 @@ xprAddScreen(int index, ScreenPtr pScreen) dfb->greenMask = 0x0000ff00; dfb->blueMask = 0x000000ff; break; - default: - FatalError("Unsupported color depth %d %d\n", darwinDesiredDepth, depth); } if (noPseudoramiXExtension) |