Try a TrueColor visual if Xrender fails with a DirectColor one.
This commit is contained in:
parent
9ed61de9a2
commit
e802bcb2e2
|
@ -97,13 +97,13 @@ void X11DRV_GDI_Initialize( Display *display )
|
||||||
{
|
{
|
||||||
gdi_display = display;
|
gdi_display = display;
|
||||||
|
|
||||||
|
/* Initialize XRender */
|
||||||
|
X11DRV_XRender_Init();
|
||||||
|
|
||||||
palette_size = X11DRV_PALETTE_Init();
|
palette_size = X11DRV_PALETTE_Init();
|
||||||
|
|
||||||
X11DRV_BITMAP_Init();
|
X11DRV_BITMAP_Init();
|
||||||
|
|
||||||
/* Initialize XRender */
|
|
||||||
X11DRV_XRender_Init();
|
|
||||||
|
|
||||||
/* Initialize device caps */
|
/* Initialize device caps */
|
||||||
log_pixels_x = log_pixels_y = get_dpi();
|
log_pixels_x = log_pixels_y = get_dpi();
|
||||||
horz_size = MulDiv( screen_width, 254, log_pixels_x * 10 );
|
horz_size = MulDiv( screen_width, 254, log_pixels_x * 10 );
|
||||||
|
|
|
@ -197,7 +197,22 @@ LOAD_OPTIONAL_FUNCPTR(XRenderSetPictureTransform)
|
||||||
X11DRV_XRender_Installed = TRUE;
|
X11DRV_XRender_Installed = TRUE;
|
||||||
TRACE("Xrender is up and running error_base = %d\n", error_base);
|
TRACE("Xrender is up and running error_base = %d\n", error_base);
|
||||||
screen_format = pXRenderFindVisualFormat(gdi_display, visual);
|
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_tsx11_unlock();
|
||||||
WINE_MESSAGE(
|
WINE_MESSAGE(
|
||||||
"Wine has detected that you probably have a buggy version\n"
|
"Wine has detected that you probably have a buggy version\n"
|
||||||
|
|
Loading…
Reference in New Issue