mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Merge pull request #2306 from lakkatv/material
(GLUI) Free textures in context_destroy
This commit is contained in:
commit
3e17c9e741
@ -873,16 +873,21 @@ static void glui_context_bg_destroy(glui_handle_t *glui)
|
||||
|
||||
static void glui_context_destroy(void)
|
||||
{
|
||||
gl_t *gl = (gl_t*)video_driver_get_ptr(NULL);
|
||||
unsigned i;
|
||||
glui_handle_t *glui = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
|
||||
if (!menu || !menu->userdata || !gl || !driver)
|
||||
if (!menu || !menu->userdata)
|
||||
return;
|
||||
|
||||
glui = (glui_handle_t*)menu->userdata;
|
||||
|
||||
if (!glui)
|
||||
return;
|
||||
|
||||
for (i = 0; i < GLUI_TEXTURE_LAST; i++)
|
||||
video_texture_unload((uintptr_t*)&glui->textures.list[i].id);
|
||||
|
||||
menu_display_free_main_font();
|
||||
|
||||
glui_context_bg_destroy(glui);
|
||||
|
Loading…
x
Reference in New Issue
Block a user