mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Remove video_context_driver_make_current
This commit is contained in:
parent
029f1c403e
commit
ca5e51f116
@ -67,7 +67,11 @@ static void gl1_raster_font_free_font(void *data,
|
||||
font->font_driver->free(font->font_data);
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(true);
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(true);
|
||||
|
||||
glDeleteTextures(1, &font->tex);
|
||||
|
||||
@ -176,7 +180,11 @@ static void *gl1_raster_font_init_font(void *data,
|
||||
RARCH_LOG("[Font]: Using font driver GL1\n");
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(false);
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(false);
|
||||
|
||||
glGenTextures(1, &font->tex);
|
||||
|
||||
|
@ -65,7 +65,11 @@ static void gl_core_raster_font_free_font(void *data,
|
||||
font->font_driver->free(font->font_data);
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(true);
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(true);
|
||||
|
||||
glDeleteTextures(1, &font->tex);
|
||||
|
||||
@ -115,7 +119,11 @@ static void *gl_core_raster_font_init_font(void *data,
|
||||
}
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(false);
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(false);
|
||||
|
||||
font->atlas = font->font_driver->get_atlas(font->font_data);
|
||||
|
||||
|
@ -67,7 +67,13 @@ static void gl_raster_font_free_font(void *data,
|
||||
font->font_driver->free(font->font_data);
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(true);
|
||||
{
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(true);
|
||||
}
|
||||
|
||||
if (font->tex)
|
||||
{
|
||||
@ -193,7 +199,11 @@ static void *gl_raster_font_init_font(void *data,
|
||||
}
|
||||
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(false);
|
||||
if (
|
||||
font->gl &&
|
||||
font->gl->ctx_driver &&
|
||||
font->gl->ctx_driver->make_current)
|
||||
font->gl->ctx_driver->make_current(false);
|
||||
|
||||
glGenTextures(1, &font->tex);
|
||||
|
||||
|
12
retroarch.c
12
retroarch.c
@ -19179,7 +19179,8 @@ bool video_driver_texture_load(void *data,
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(false);
|
||||
if (current_video_context.make_current)
|
||||
current_video_context.make_current(false);
|
||||
#endif
|
||||
|
||||
*id = video_driver_poke->load_texture(video_driver_data, data,
|
||||
@ -19199,7 +19200,8 @@ bool video_driver_texture_unload(uintptr_t *id)
|
||||
|
||||
#ifdef HAVE_THREADS
|
||||
if (is_threaded)
|
||||
video_context_driver_make_current(false);
|
||||
if (current_video_context.make_current)
|
||||
current_video_context.make_current(false);
|
||||
#endif
|
||||
|
||||
video_driver_poke->unload_texture(video_driver_data, *id);
|
||||
@ -19609,12 +19611,6 @@ bool video_context_driver_get_video_output_next(void)
|
||||
return true;
|
||||
}
|
||||
|
||||
void video_context_driver_make_current(bool release)
|
||||
{
|
||||
if (current_video_context.make_current)
|
||||
current_video_context.make_current(release);
|
||||
}
|
||||
|
||||
bool video_context_driver_translate_aspect(gfx_ctx_aspect_t *aspect)
|
||||
{
|
||||
if (!video_context_data || !aspect)
|
||||
|
@ -1843,8 +1843,6 @@ bool video_context_driver_get_video_output_prev(void);
|
||||
|
||||
bool video_context_driver_get_video_output_next(void);
|
||||
|
||||
void video_context_driver_make_current(bool restore);
|
||||
|
||||
bool video_context_driver_set(const gfx_ctx_driver_t *data);
|
||||
|
||||
void video_context_driver_destroy(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user