Fix fullscreen swapping with cached context cores.

This commit is contained in:
Themaister 2014-05-11 20:10:17 +02:00
parent 7559ca12ef
commit 6d99bb2e2a
3 changed files with 3 additions and 3 deletions

View File

@ -805,7 +805,7 @@ static void gfx_ctx_bind_hw_render(void *data, bool enable)
{
(void)data;
g_use_hw_ctx = enable;
if (g_egl_dpy)
if (g_egl_dpy && g_egl_surf)
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, enable ? g_egl_hw_ctx : g_egl_ctx);
}

View File

@ -626,7 +626,7 @@ static void gfx_ctx_bind_hw_render(void *data, bool enable)
(void)data;
g_use_hw_ctx = enable;
if (g_dpy)
if (g_dpy && g_glx_win)
{
//RARCH_LOG("[GLX]: Binding context (%s): %p\n", enable ? "RetroArch" : "HW render", enable ? (void*)g_hw_ctx : (void*)g_ctx);
glXMakeContextCurrent(g_dpy, g_glx_win, g_glx_win, enable ? g_hw_ctx : g_ctx);

View File

@ -713,7 +713,7 @@ static void gfx_ctx_bind_hw_render(void *data, bool enable)
{
(void)data;
g_use_hw_ctx = enable;
if (g_egl_dpy)
if (g_egl_dpy && g_egl_surf)
eglMakeCurrent(g_egl_dpy, g_egl_surf, g_egl_surf, enable ? g_egl_hw_ctx : g_egl_ctx);
}