X-Git-Url: https://git.reactos.org/?p=reactos.git;a=blobdiff_plain;f=reactos%2Fdll%2Fwin32%2Fgdi32%2Fmisc%2Fwingl.c;h=b20ac7ee9d2a3042ba6d3bb4757231bdef7b9849;hp=5373c6f4d2ddbea057d1db9e5944210ca19c7f5e;hb=684c3d3791b92777e7de259fbc6691161f6808c7;hpb=f5258132f4eef483cce5491037d4383f958ce1a2 diff --git a/reactos/dll/win32/gdi32/misc/wingl.c b/reactos/dll/win32/gdi32/misc/wingl.c index 5373c6f4d2d..b20ac7ee9d2 100644 --- a/reactos/dll/win32/gdi32/misc/wingl.c +++ b/reactos/dll/win32/gdi32/misc/wingl.c @@ -166,6 +166,10 @@ SetPixelFormat(HDC hdc, INT iPixelFormat, CONST PIXELFORMATDESCRIPTOR * ppfd) { + /* Can only be set once */ + INT current = GetPixelFormat(hdc); + if(current) return current == iPixelFormat ; + if (glSetPixelFormat == NULL) if (OpenGLEnable() == FALSE) return(0);