diff --git a/gfx/context/glx_ctx.c b/gfx/context/glx_ctx.c index fae58f4674..a59c36d3e9 100644 --- a/gfx/context/glx_ctx.c +++ b/gfx/context/glx_ctx.c @@ -408,6 +408,7 @@ static bool gfx_ctx_set_video_mode( if (g_is_double) { const char *swap_func = NULL; + g_pglSwapInterval = (int (*)(int))glXGetProcAddress((const GLubyte*)"glXSwapIntervalMESA"); if (g_pglSwapInterval) swap_func = "glXSwapIntervalMESA"; @@ -458,6 +459,7 @@ static void gfx_ctx_destroy(void) { if (g_dpy && g_ctx) { + glFinish(); glXMakeContextCurrent(g_dpy, None, None, NULL); if (!driver.video_cache_context) { diff --git a/gfx/context/wgl_ctx.c b/gfx/context/wgl_ctx.c index 52f3be9e20..1af72a9420 100644 --- a/gfx/context/wgl_ctx.c +++ b/gfx/context/wgl_ctx.c @@ -490,6 +490,7 @@ static void gfx_ctx_destroy(void) { if (g_hrc) { + glFinish(); wglMakeCurrent(NULL, NULL); if (!driver.video_cache_context)