summaryrefslogtreecommitdiff
path: root/hw/vfb
diff options
context:
space:
mode:
authorKevin E Martin <kem@kem.org>2005-11-07 21:03:49 +0000
committerKevin E Martin <kem@kem.org>2005-11-07 21:03:49 +0000
commite73cdba865f36ebf78c2dc4ff674b4d9bfe85013 (patch)
tree5e1c95c5641dec1f107525adc1d817ab47d7b402 /hw/vfb
parent890ed0e082e048fa8daf48229b40558381bd131d (diff)
Fix Xvfb to work properly in depth 15 mode. Fixes XTS5 XCloseDisplay-3
server crash.
Diffstat (limited to 'hw/vfb')
-rw-r--r--hw/vfb/InitOutput.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/hw/vfb/InitOutput.c b/hw/vfb/InitOutput.c
index ae3db3f4e..630d3e133 100644
--- a/hw/vfb/InitOutput.c
+++ b/hw/vfb/InitOutput.c
@@ -698,12 +698,11 @@ vfbAllocateFramebufferMemory(vfbScreenInfoPtr pvfb)
/* Calculate how many entries in colormap. This is rather bogus, because
* the visuals haven't even been set up yet, but we need to know because we
- * have to allocate space in the file for the colormap. The number 15
- * below comes from the detail that the size of a colormap is limited to
- * 15bits.
+ * have to allocate space in the file for the colormap. The number 10
+ * below comes from the MAX_PSEUDO_DEPTH define in cfbcmap.c.
*/
- if (pvfb->depth <= 15)
+ if (pvfb->depth <= 10)
{ /* single index colormaps */
pvfb->ncolors = 1 << pvfb->depth;
}
@@ -908,9 +907,7 @@ vfbScreenInit(int index, ScreenPtr pScreen, int argc, char **argv)
#endif
case 15:
miSetVisualTypesAndMasks (15,
- ((1 << GrayScale) |
- (1 << PseudoColor) |
- (1 << TrueColor) |
+ ((1 << TrueColor) |
(1 << DirectColor)),
8, TrueColor, 0x7c00, 0x03e0, 0x001f);
break;