Commit 0cca1ea8 authored by Chris Robinson's avatar Chris Robinson Committed by Alexandre Julliard

winex11: Don't choose double buffered modes with gdi support.

parent d298b68f
...@@ -607,6 +607,8 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf ...@@ -607,6 +607,8 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
int drawattrib = 0; int drawattrib = 0;
int nvfloatattrib = GLX_DONT_CARE; int nvfloatattrib = GLX_DONT_CARE;
int pixelattrib = 0; int pixelattrib = 0;
int supportgdi = -1;
int doublebuf = -1;
/* The list of WGL attributes is allowed to be NULL. We don't return here for NULL /* The list of WGL attributes is allowed to be NULL. We don't return here for NULL
* because we need to do fixups for GLX_DRAWABLE_TYPE/GLX_RENDER_TYPE/GLX_FLOAT_COMPONENTS_NV. */ * because we need to do fixups for GLX_DRAWABLE_TYPE/GLX_RENDER_TYPE/GLX_FLOAT_COMPONENTS_NV. */
...@@ -653,6 +655,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf ...@@ -653,6 +655,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
pop = iWGLAttr[++cur]; pop = iWGLAttr[++cur];
PUSH2(oGLXAttr, GLX_DOUBLEBUFFER, pop); PUSH2(oGLXAttr, GLX_DOUBLEBUFFER, pop);
TRACE("pAttr[%d] = GLX_DOUBLEBUFFER: %d\n", cur, pop); TRACE("pAttr[%d] = GLX_DOUBLEBUFFER: %d\n", cur, pop);
doublebuf = pop;
break; break;
case WGL_PIXEL_TYPE_ARB: case WGL_PIXEL_TYPE_ARB:
...@@ -673,6 +676,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf ...@@ -673,6 +676,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
pop = iWGLAttr[++cur]; pop = iWGLAttr[++cur];
PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop); PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop);
TRACE("pAttr[%d] = WGL_SUPPORT_GDI_ARB: %d\n", cur, pop); TRACE("pAttr[%d] = WGL_SUPPORT_GDI_ARB: %d\n", cur, pop);
supportgdi = pop;
break; break;
case WGL_DRAW_TO_BITMAP_ARB: case WGL_DRAW_TO_BITMAP_ARB:
...@@ -772,6 +776,15 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf ...@@ -772,6 +776,15 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
++cur; ++cur;
} }
if(supportgdi > 0) {
if(doublebuf > 0) {
WARN("Attempting double-buffered gdi format\n");
return -1;
}
if(doublebuf < 0)
PUSH2(oGLXAttr, GLX_DOUBLEBUFFER, False);
}
/* Apply the OR'd drawable type bitmask now EVEN when WGL_DRAW_TO* is unset. /* Apply the OR'd drawable type bitmask now EVEN when WGL_DRAW_TO* is unset.
* It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */ * It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib); PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib);
......
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