win32_common: fix link error when WGL is built without OpenGL

When Vulkan is enabled on Win32, Makefile.common sets WANT_WGL=1 even
if all OpenGL variants are disabled. This compiles wgl_ctx.c, which
references wnd_proc_wgl_common / _dinput / _winraw - but those symbols
were only defined under #if HAVE_OPENGL || HAVE_OPENGL1 || HAVE_OPENGL_CORE,
producing undefined-reference link errors.

Widen the guard around the wnd_proc_wgl_* block to also activate when
HAVE_VULKAN is defined, matching the conditions under which wgl_ctx.c
is actually compiled. The extern create_gl_context / create_gles_context
declarations remain gated on the OpenGL defines, since they only have
definitions in those builds.
This commit is contained in:
Lib authored and U-DESKTOP-SPFP6AQ\twistedtechre committed 2026-05-08 14:05:10 +02:00
1 parent 10a9e48df4
commit 1e45eafecf
1 file changed
+2
+2
View File
@@ -1207,9 +1207,11 @@ LRESULT CALLBACK wnd_proc_d3d_dinput(HWND hwnd, UINT message,
#endif
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE) || defined(HAVE_VULKAN)
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL1) || defined(HAVE_OPENGL_CORE)
extern void create_gl_context(HWND hwnd, bool *quit);
extern void create_gles_context(HWND hwnd, bool *quit);
#endif
static LRESULT wnd_proc_wgl_wm_create(HWND hwnd)
{