Create menu_shader_free

This commit is contained in:
twinaphex 2015-06-15 02:15:46 +02:00
parent c46c2f68ee
commit 1831479079
3 changed files with 12 additions and 5 deletions

View File

@ -251,11 +251,7 @@ void menu_free(menu_handle_t *menu)
content_playlist_free(menu->playlist);
menu->playlist = NULL;
#ifdef HAVE_SHADER_MANAGER
if (menu->shader)
free(menu->shader);
menu->shader = NULL;
#endif
menu_shader_free(menu);
menu_driver_free(menu);

View File

@ -346,3 +346,12 @@ void menu_shader_manager_apply_changes(void)
menu_shader_manager_set_preset(NULL, shader_type, NULL);
#endif
}
void menu_shader_free(menu_handle_t *menu)
{
#ifdef HAVE_SHADER_MANAGER
if (menu->shader)
free(menu->shader);
menu->shader = NULL;
#endif
}

View File

@ -70,6 +70,8 @@ unsigned menu_shader_manager_get_type(
**/
void menu_shader_manager_apply_changes(void);
void menu_shader_free(menu_handle_t *menu);
#ifdef __cplusplus
}
#endif