WGL: Fix pixel format count in a Parallels VM

In a Parallels VM wglGetPixelFormatAttribivARB returns fewer pixel
formats than DescribePixelFormat.  This broke context creation on
Windows in Parallels since the changes in
2c0f34b60f.  The previous version of the
code worked accidentally.

This adds a workaround by iterating through the minimum of both counts.
It should have no effect when running on conforming implementations.

Tested on Parallels by @ dougbinks.

Closes #2191
Fixes #2406
Fixes #2467

This was adapted to 3.3-stable from
00e86d4b73.
This commit is contained in:
Camilla Löwy
2024-01-30 18:21:33 +01:00
parent ae44e10b33
commit bc788a9333
3 changed files with 20 additions and 0 deletions
+2
View File
@@ -45,6 +45,7 @@ video tutorials.
- Bailey Cosier
- Noel Cower
- CuriouserThing
- Bill Currie
- Jason Daly
- danhambleton
- Jarrod Davis
@@ -162,6 +163,7 @@ video tutorials.
- Martins Mozeiko
- James Murphy
- Julian Møller
- NateIsStalling
- ndogxj
- F. Nedelec
- Kristian Nielsen