mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-05 22:00:11 +01:00
stw: Hack for applications which use wglSetPixelFormat instead of SetPixelFormat.
This commit is contained in:
parent
5b0807b72f
commit
9fb9ee9d24
1 changed files with 8 additions and 0 deletions
|
|
@ -256,6 +256,14 @@ stw_pixelformat_set(
|
|||
return FALSE;
|
||||
|
||||
currentpixelformat = iPixelFormat;
|
||||
|
||||
/* Some applications mistakenly use the undocumented wglSetPixelFormat
|
||||
* function instead of SetPixelFormat, so we call SetPixelFormat here to
|
||||
* avoid opengl32.dll's wglCreateContext to fail */
|
||||
if (GetPixelFormat(hdc) == 0) {
|
||||
SetPixelFormat(hdc, iPixelFormat, NULL);
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue