Page Menu
Home
Search
Configure Global Search
Log In
Files
F6295
windows_stereo.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Benoit Bolsee (ben2610)
Nov 13 2013, 1:34 PM
Size
1 KB
Subscribers
None
windows_stereo.patch
View Options
This document is not UTF8. It was detected as Shift JIS and converted to UTF8 for display.
Index: intern/ghost/intern/GHOST_WindowWin32.cpp
===================================================================
--- intern/ghost/intern/GHOST_WindowWin32.cpp (rWision 14932)
+++ intern/ghost/intern/GHOST_WindowWin32.cpp (copie de travail)
@@ -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;
}
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
71/34/cde13b014cc0b8701d057c1593f0
Event Timeline
Log In to Comment