mirror of
https://github.com/libretro/RetroArch
synced 2025-04-15 23:42:30 +00:00
Rewrite gfx_ctx_x_make_current a bit and turn it into a
static function
This commit is contained in:
parent
90a303050f
commit
12cfb3bfce
@ -258,7 +258,6 @@ const gfx_ctx_driver_t gfx_ctx_khr_display = {
|
|||||||
gfx_ctx_khr_display_set_flags,
|
gfx_ctx_khr_display_set_flags,
|
||||||
NULL,
|
NULL,
|
||||||
gfx_ctx_khr_display_get_context_data,
|
gfx_ctx_khr_display_get_context_data,
|
||||||
NULL,
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -917,19 +917,28 @@ static void gfx_ctx_x_set_flags(void *data, uint32_t flags)
|
|||||||
x->core_hw_context_enable = true;
|
x->core_hw_context_enable = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void gfx_ctx_x_make_current(bool release)
|
static void gfx_ctx_x_make_current(bool release)
|
||||||
{
|
{
|
||||||
if (!current_context_data)
|
if (!current_context_data)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (release)
|
switch (x_api)
|
||||||
{
|
{
|
||||||
glXMakeContextCurrent(g_x11_dpy, None, None, NULL);
|
case GFX_CTX_OPENGL_API:
|
||||||
}
|
case GFX_CTX_OPENGL_ES_API:
|
||||||
else
|
#ifdef HAVE_OPENGL
|
||||||
{
|
if (release)
|
||||||
glXMakeContextCurrent(g_x11_dpy,
|
glXMakeContextCurrent(g_x11_dpy, None, None, NULL);
|
||||||
current_context_data->g_glx_win, current_context_data->g_glx_win, current_context_data->g_ctx);
|
else
|
||||||
|
glXMakeContextCurrent(g_x11_dpy,
|
||||||
|
current_context_data->g_glx_win,
|
||||||
|
current_context_data->g_glx_win, current_context_data->g_ctx);
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
|
||||||
|
case GFX_CTX_NONE:
|
||||||
|
default:
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -967,10 +976,6 @@ const gfx_ctx_driver_t gfx_ctx_x = {
|
|||||||
#else
|
#else
|
||||||
NULL,
|
NULL,
|
||||||
#endif
|
#endif
|
||||||
#ifdef HAVE_OPENGL
|
|
||||||
gfx_ctx_x_make_current
|
gfx_ctx_x_make_current
|
||||||
#else
|
|
||||||
NULL
|
|
||||||
#endif
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user