Commit e802bcb2 authored by Alexandre Julliard's avatar Alexandre Julliard

Try a TrueColor visual if Xrender fails with a DirectColor one.

parent 9ed61de9
......@@ -97,13 +97,13 @@ void X11DRV_GDI_Initialize( Display *display )
{
gdi_display = display;
/* Initialize XRender */
X11DRV_XRender_Init();
palette_size = X11DRV_PALETTE_Init();
X11DRV_BITMAP_Init();
/* Initialize XRender */
X11DRV_XRender_Init();
/* Initialize device caps */
log_pixels_x = log_pixels_y = get_dpi();
horz_size = MulDiv( screen_width, 254, log_pixels_x * 10 );
......
......@@ -197,7 +197,22 @@ LOAD_OPTIONAL_FUNCPTR(XRenderSetPictureTransform)
X11DRV_XRender_Installed = TRUE;
TRACE("Xrender is up and running error_base = %d\n", error_base);
screen_format = pXRenderFindVisualFormat(gdi_display, visual);
if(!screen_format) { /* This fails in buggy versions of libXrender.so */
if(!screen_format)
{
/* Xrender doesn't like DirectColor visuals, try to find a TrueColor one instead */
if (visual->class == DirectColor)
{
XVisualInfo info;
if (XMatchVisualInfo( gdi_display, DefaultScreen(gdi_display),
screen_depth, TrueColor, &info ))
{
screen_format = pXRenderFindVisualFormat(gdi_display, info.visual);
if (screen_format) visual = info.visual;
}
}
}
if(!screen_format) /* This fails in buggy versions of libXrender.so */
{
wine_tsx11_unlock();
WINE_MESSAGE(
"Wine has detected that you probably have a buggy version\n"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment