[OPENGL32] Fix the order of the specified callbacks for the DrvSetCallbackProcs(... 1499/head
authorHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 22 Apr 2019 16:29:43 +0000 (18:29 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Mon, 22 Apr 2019 16:29:43 +0000 (18:29 +0200)
References:
- https://github.com/OpenSWR/openswr/blob/master/ogldriver/wgl.cpp
- https://github.com/Igalia/mesa/blob/master/src/gallium/state_trackers/wgl/stw_icd.h
- "OpenGL Installable Client Driver, Version 1.101 -- Reference Guide" by Microsoft Corporation.

dll/opengl/opengl32/icdload.c

index 0f4c65a..fc86d86 100644 (file)
@@ -287,10 +287,11 @@ custom_end:
     DrvSetCallbackProcs = (void*)GetProcAddress(data->hModule, "DrvSetCallbackProcs");
     if(DrvSetCallbackProcs)
     {
-        PROC callbacks[] = {(PROC)wglGetCurrentValue,
+        PROC callbacks[] = {
             (PROC)wglSetCurrentValue,
+            (PROC)wglGetCurrentValue,
             (PROC)wglGetDHGLRC};
-        DrvSetCallbackProcs(3, callbacks);
+        DrvSetCallbackProcs(ARRAYSIZE(callbacks), callbacks);
     }
     
     /* Get the DLL exports */