From ee931cf79f5d0d138d5547a3d771cc8f49881483 Mon Sep 17 00:00:00 2001 From: Luca Bacci Date: Wed, 25 Jun 2025 15:41:18 +0200 Subject: [PATCH] Ensure dispatch table initialization Fixes https://github.com/msys2/MINGW-packages/issues/24571 --- src/dispatch_wgl.c | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/src/dispatch_wgl.c b/src/dispatch_wgl.c index 7baf130..a65ee01 100644 --- a/src/dispatch_wgl.c +++ b/src/dispatch_wgl.c @@ -144,11 +144,9 @@ DllMain(HINSTANCE dll, DWORD reason, LPVOID reserved) WRAPPER_VISIBILITY (BOOL) WRAPPER(epoxy_wglMakeCurrent)(HDC hdc, HGLRC hglrc) { - BOOL ret = epoxy_wglMakeCurrent_unwrapped(hdc, hglrc); - epoxy_handle_external_wglMakeCurrent(); - return ret; + return epoxy_wglMakeCurrent_unwrapped(hdc, hglrc); } @@ -157,12 +155,9 @@ WRAPPER(epoxy_wglMakeContextCurrentARB)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) { - BOOL ret = epoxy_wglMakeContextCurrentARB_unwrapped(hDrawDC, hReadDC, - hglrc); - epoxy_handle_external_wglMakeCurrent(); - return ret; + return epoxy_wglMakeContextCurrentARB_unwrapped(hDrawDC, hReadDC, hglrc); } @@ -171,23 +166,18 @@ WRAPPER(epoxy_wglMakeContextCurrentEXT)(HDC hDrawDC, HDC hReadDC, HGLRC hglrc) { - BOOL ret = epoxy_wglMakeContextCurrentEXT_unwrapped(hDrawDC, hReadDC, - hglrc); - epoxy_handle_external_wglMakeCurrent(); - return ret; + return epoxy_wglMakeContextCurrentEXT_unwrapped(hDrawDC, hReadDC, hglrc); } WRAPPER_VISIBILITY (BOOL) WRAPPER(epoxy_wglMakeAssociatedContextCurrentAMD)(HGLRC hglrc) { - BOOL ret = epoxy_wglMakeAssociatedContextCurrentAMD_unwrapped(hglrc); - epoxy_handle_external_wglMakeCurrent(); - return ret; + return epoxy_wglMakeAssociatedContextCurrentAMD_unwrapped(hglrc); } PFNWGLMAKECURRENTPROC epoxy_wglMakeCurrent = epoxy_wglMakeCurrent_wrapped; -- 2.49.0.windows.1