Revision: 14957
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14957
Author:   ben2610
Date:     2008-05-25 16:32:26 +0200 (Sun, 25 May 2008)

Log Message:
-----------
Apply BGE patch 12799: Fix quad buffer stereo mode for Windows

Modified Paths:
--------------
    trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp

Modified: trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp     2008-05-25 
13:53:58 UTC (rev 14956)
+++ trunk/blender/intern/ghost/intern/GHOST_WindowWin32.cpp     2008-05-25 
14:32:26 UTC (rev 14957)
@@ -871,12 +871,25 @@
        for(i=1; i<=n; i++) { /* not the idiom, but it's right */
                ::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), 
&pfd );
                w = WeightPixelFormat(pfd);
-               if(w > weight) {
-                       weight = w;
-                       iPixelFormat = i;
+               // be strict on stereo
+               if (!((sPreferredFormat.dwFlags ^ pfd.dwFlags) & PFD_STEREO))   
{
+                       if(w > weight) {
+                               weight = w;
+                               iPixelFormat = i;
+                       }
                }
        }
-       
+       if (weight == 0) {
+               // we could find the correct stereo setting, just find any 
suitable format 
+               for(i=1; i<=n; i++) { /* not the idiom, but it's right */
+                       ::DescribePixelFormat( hdc, i, 
sizeof(PIXELFORMATDESCRIPTOR), &pfd );
+                       w = WeightPixelFormat(pfd);
+                       if(w > weight) {
+                               weight = w;
+                               iPixelFormat = i;
+                       }
+               }
+       }
        return iPixelFormat;
 }
 


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to