Chris Robinson : winex11: Don' t choose double buffered modes with gdi support.
Alexandre Julliard
julliard at winehq.org
Wed Oct 10 15:27:21 CDT 2007
Module: wine
Branch: master
Commit: 0cca1ea876ce0451c4653ab895f19bd8597dab1f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=0cca1ea876ce0451c4653ab895f19bd8597dab1f
Author: Chris Robinson <chris.kcat at gmail.com>
Date: Wed Oct 3 10:52:53 2007 -0700
winex11: Don't choose double buffered modes with gdi support.
---
dlls/winex11.drv/opengl.c | 13 +++++++++++++
1 files changed, 13 insertions(+), 0 deletions(-)
diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 588b3b6..c45fa68 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -607,6 +607,8 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
int drawattrib = 0;
int nvfloatattrib = GLX_DONT_CARE;
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
* 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
pop = iWGLAttr[++cur];
PUSH2(oGLXAttr, GLX_DOUBLEBUFFER, pop);
TRACE("pAttr[%d] = GLX_DOUBLEBUFFER: %d\n", cur, pop);
+ doublebuf = pop;
break;
case WGL_PIXEL_TYPE_ARB:
@@ -673,6 +676,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
pop = iWGLAttr[++cur];
PUSH2(oGLXAttr, GLX_X_RENDERABLE, pop);
TRACE("pAttr[%d] = WGL_SUPPORT_GDI_ARB: %d\n", cur, pop);
+ supportgdi = pop;
break;
case WGL_DRAW_TO_BITMAP_ARB:
@@ -772,6 +776,15 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
++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.
* It is needed in all cases because GLX_DRAWABLE_TYPE default to GLX_WINDOW_BIT. */
PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib);
More information about the wine-cvs
mailing list