diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index b91cfb90fb..4540cdc832 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -292,6 +292,8 @@ static bool gfx_ctx_set_video_mode( g_is_double = val; if (g_is_double) { + if (!g_pglSwapInterval) + g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapInterval"); if (!g_pglSwapInterval) g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalMESA"); if (!g_pglSwapInterval) diff --git a/gfx/context/sdl_ctx.c b/gfx/context/sdl_ctx.c index f55906f3b5..c608add95d 100644 --- a/gfx/context/sdl_ctx.c +++ b/gfx/context/sdl_ctx.c @@ -64,6 +64,8 @@ static void gfx_ctx_swap_interval(unsigned interval) success = CGLSetParameter(CGLGetCurrentContext(), kCGLCPSwapInterval, &val) == 0; #else static int (*glx_swap_interval)(int) = NULL; + if (!glx_swap_interval) + GL_SYM_WRAP(glx_swap_interval, "glXSwapInterval"); if (!glx_swap_interval) GL_SYM_WRAP(glx_swap_interval, "glXSwapIntervalMESA"); if (!glx_swap_interval)