sync with trunk r47227
[reactos.git] / dll / win32 / gdi32 / misc / wingl.c
index 5373c6f..b20ac7e 100644 (file)
@@ -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);