Xephyr: Handle depth 30 and reject higher depths rather than crashing.

This commit is contained in:
Aaron Plattner 2008-05-04 10:26:25 -07:00
parent f4a68f3701
commit d500eeb945

View File

@ -150,11 +150,22 @@ ephyrScreenInitialize (KdScreenInfo *screen, EphyrScrPriv *scrpriv)
screen->fb[0].depth = 16;
screen->fb[0].bitsPerPixel = 16;
}
else
else if (screen->fb[0].depth <= 24)
{
screen->fb[0].depth = 24;
screen->fb[0].bitsPerPixel = 32;
}
else if (screen->fb[0].depth <= 30)
{
screen->fb[0].depth = 30;
screen->fb[0].bitsPerPixel = 32;
}
else
{
ErrorF("\nXephyr: Unsupported screen depth %d\n",
screen->fb[0].depth);
return FALSE;
}
hostx_get_visual_masks (screen, &redMask, &greenMask, &blueMask);