Huw Davies : winex11.drv: If the app asks for a single buffered pixel format, then it should be happy with a double buffered one.

Alexandre Julliard julliard at wine.codeweavers.com
Sat Nov 4 13:32:32 CST 2006


Module: wine
Branch: master
Commit: 7d4163b5fa13537ae314d16e5257c5fe7ba7fc80
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7d4163b5fa13537ae314d16e5257c5fe7ba7fc80

Author: Huw Davies <huw at codeweavers.com>
Date:   Fri Nov  3 12:30:40 2006 +0000

winex11.drv: If the app asks for a single buffered pixel format, then it should be happy with a double buffered one.

Likewise for mono vs stereo.
Add some TRACEs so that we know what condition is failing.

---

 dlls/winex11.drv/opengl.c |   15 +++++++++++----
 1 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/dlls/winex11.drv/opengl.c b/dlls/winex11.drv/opengl.c
index 962962f..feec150 100644
--- a/dlls/winex11.drv/opengl.c
+++ b/dlls/winex11.drv/opengl.c
@@ -895,21 +895,24 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV
       iPixelType = PFD_TYPE_COLORINDEX;
 
     if (ppfd->iPixelType != iPixelType) {
+      TRACE("pixel type mismatch\n");
       goto choose_exit;
     }
 
     /* Doublebuffer */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_DOUBLEBUFFER, &value); if (value) dwFlags |= PFD_DOUBLEBUFFER;
-    if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE)) {
-      if ((ppfd->dwFlags & PFD_DOUBLEBUFFER) != (dwFlags & PFD_DOUBLEBUFFER)) {
+    if (!(ppfd->dwFlags & PFD_DOUBLEBUFFER_DONTCARE) && (ppfd->dwFlags & PFD_DOUBLEBUFFER)) {
+      if (!(dwFlags & PFD_DOUBLEBUFFER)) {
+        TRACE("dbl buffer mismatch\n");
         goto choose_exit;
       }
     }
 
     /* Stereo */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_STEREO, &value); if (value) dwFlags |= PFD_STEREO;
-    if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE)) {
-      if ((ppfd->dwFlags & PFD_STEREO) != (dwFlags & PFD_STEREO)) {
+    if (!(ppfd->dwFlags & PFD_STEREO_DONTCARE) && (ppfd->dwFlags & PFD_STEREO)) {
+      if (!(dwFlags & PFD_STEREO)) {
+        TRACE("stereo mismatch\n");
         goto choose_exit;
       }
     }
@@ -917,24 +920,28 @@ int X11DRV_ChoosePixelFormat(X11DRV_PDEV
     /* Alpha bits */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_ALPHA_SIZE, &value);
     if (ppfd->iPixelType==PFD_TYPE_RGBA && ppfd->cAlphaBits && !value) {
+      TRACE("alpha mismatch\n");
       goto choose_exit;
     }
 
     /* Depth bits */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_DEPTH_SIZE, &value);
     if (ppfd->cDepthBits && !value) {
+      TRACE("depth mismatch\n");
       goto choose_exit;
     }
 
     /* Stencil bits */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_STENCIL_SIZE, &value);
     if (ppfd->cStencilBits && !value) {
+      TRACE("stencil mismatch\n");
       goto choose_exit;
     }
 
     /* Aux buffers */
     pglXGetFBConfigAttrib(gdi_display, cfgs[fmt_index], GLX_AUX_BUFFERS, &value);
     if (ppfd->cAuxBuffers && !value) {
+      TRACE("aux mismatch\n");
       goto choose_exit;
     }
 




More information about the wine-cvs mailing list