gallium/wgl: fix default pixel format issue
authorFrank Richter <frank.richter@dynardo.de>
Tue, 17 Oct 2017 08:34:27 +0000 (10:34 +0200)
committerBrian Paul <brianp@vmware.com>
Wed, 15 Nov 2017 23:12:43 +0000 (16:12 -0700)
commitbf41b2b2627aa3790d380092c28c5d3395cc9cde
treeca14546652377f8b1e9a59c745564a0605a95705
parent824e8084ed557061cd7a008b08da15897277d66e
gallium/wgl: fix default pixel format issue

When creating a context without SetPixelFormat() don't blindly take the
pixel format reported by GDI. Instead, look for our own closest pixel
format.

Minor clean-ups added by Brian Paul.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103412
Reviewed-by: Brian Paul <brianp@vmware.com>
Tested-by: Brian Paul <brianp@vmware.com>
src/gallium/state_trackers/wgl/stw_context.c