forked from bartvdbraak/blender
Apply BGE patch 12799: Fix quad buffer stereo mode for Windows
This commit is contained in:
parent
55f1b6baa7
commit
31ec51df42
@ -871,12 +871,25 @@ static int EnumPixelFormats(HDC hdc) {
|
|||||||
for(i=1; i<=n; i++) { /* not the idiom, but it's right */
|
for(i=1; i<=n; i++) { /* not the idiom, but it's right */
|
||||||
::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd );
|
::DescribePixelFormat( hdc, i, sizeof(PIXELFORMATDESCRIPTOR), &pfd );
|
||||||
w = WeightPixelFormat(pfd);
|
w = WeightPixelFormat(pfd);
|
||||||
|
// be strict on stereo
|
||||||
|
if (!((sPreferredFormat.dwFlags ^ pfd.dwFlags) & PFD_STEREO)) {
|
||||||
if(w > weight) {
|
if(w > weight) {
|
||||||
weight = w;
|
weight = w;
|
||||||
iPixelFormat = i;
|
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;
|
return iPixelFormat;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user