1
0
mirror of https://github.com/libretro/RetroArch synced 2025-02-19 12:41:00 +00:00

Only use wglGetProcAddress for OpenGL

This commit is contained in:
twinaphex 2017-05-16 22:40:47 +02:00
parent 7cb78d499c
commit f24a73351c

@ -589,11 +589,21 @@ static bool gfx_ctx_wgl_has_windowed(void *data)
static gfx_ctx_proc_t gfx_ctx_wgl_get_proc_address(const char *symbol) static gfx_ctx_proc_t gfx_ctx_wgl_get_proc_address(const char *symbol)
{ {
#if defined(HAVE_OPENGL) || defined(HAVE_VULKAN) switch (win32_api)
gfx_ctx_proc_t func = (gfx_ctx_proc_t)wglGetProcAddress(symbol); {
if (func) case GFX_CTX_OPENGL_API:
return func; #if defined(HAVE_OPENGL)
{
gfx_ctx_proc_t func = (gfx_ctx_proc_t)wglGetProcAddress(symbol);
if (func)
return func;
}
#endif #endif
break;
default:
break;
}
return (gfx_ctx_proc_t)GetProcAddress((HINSTANCE)dll_handle, symbol); return (gfx_ctx_proc_t)GetProcAddress((HINSTANCE)dll_handle, symbol);
} }