[PATCH 1/5] winex11: Use GLX_DONT_CARE instead of ~0 in ConvertAttribWGLtoGLX().

Henri Verbeet hverbeet at codeweavers.com
Tue Mar 27 13:35:49 CDT 2012


---
 dlls/winex11.drv/opengl.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index e8d0f89..e25e082 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -680,7 +680,7 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
   int pop;
   int drawattrib = 0;
   int nvfloatattrib = GLX_DONT_CARE;
-  int pixelattrib = ~0;
+  int pixelattrib = GLX_DONT_CARE;
 
   /* 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. */
@@ -876,15 +876,15 @@ static int ConvertAttribWGLtoGLX(const int* iWGLAttr, int* oGLXAttr, Wine_GLPBuf
   }
 
   /* By default glXChooseFBConfig defaults to GLX_WINDOW_BIT. wglChoosePixelFormatARB searches through
-   * all formats. Unless drawattrib is set to a non-zero value override it with ~0, so that pixmap and pbuffer
-   * formats appear as well. */
-  if(!drawattrib) drawattrib = ~0;
+   * all formats. Unless drawattrib is set to a non-zero value override it with GLX_DONT_CARE, so that
+   * pixmap and pbuffer formats appear as well. */
+  if (!drawattrib) drawattrib = GLX_DONT_CARE;
   PUSH2(oGLXAttr, GLX_DRAWABLE_TYPE, drawattrib);
   TRACE("pAttr[?] = GLX_DRAWABLE_TYPE: %#x\n", drawattrib);
 
   /* By default glXChooseFBConfig uses GLX_RGBA_BIT as the default value. Since wglChoosePixelFormatARB
-   * searches in all formats we have to do the same. For this reason we set GLX_RENDER_TYPE to ~0 unless
-   * it is overridden. */
+   * searches in all formats we have to do the same. For this reason we set GLX_RENDER_TYPE to
+   * GLX_DONT_CARE unless it is overridden. */
   PUSH2(oGLXAttr, GLX_RENDER_TYPE, pixelattrib);
   TRACE("pAttr[?] = GLX_RENDER_TYPE: %#x\n", pixelattrib);
 
-- 
1.7.3.4




More information about the wine-patches mailing list