Create menu_driver_destroy

This commit is contained in:
twinaphex 2017-05-28 15:09:17 +02:00
parent dbbcba41a5
commit 721c6bc5bb
3 changed files with 16 additions and 13 deletions

View File

@ -434,7 +434,7 @@ bool driver_ctl(enum driver_ctl_state state, void *data)
audio_driver_destroy();
input_driver_destroy();
#ifdef HAVE_MENU
menu_driver_ctl(RARCH_MENU_CTL_DESTROY, NULL);
menu_driver_destroy();
#endif
location_driver_ctl(RARCH_LOCATION_CTL_DESTROY, NULL);
camera_driver_ctl(RARCH_CAMERA_CTL_DESTROY, NULL);

View File

@ -1688,6 +1688,19 @@ void menu_driver_set_thumbnail_content(char *s, size_t len)
menu_driver_ctx->set_thumbnail_content(menu_userdata, s, len);
}
void menu_driver_destroy(void)
{
menu_driver_pending_quick_menu = false;
menu_driver_pending_quit = false;
menu_driver_pending_shutdown = false;
menu_driver_prevent_populate = false;
menu_driver_load_no_content = false;
menu_driver_alive = false;
menu_driver_data_own = false;
menu_driver_ctx = NULL;
menu_userdata = NULL;
}
bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
{
switch (state)
@ -1709,17 +1722,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
case RARCH_MENU_CTL_SET_PENDING_SHUTDOWN:
menu_driver_pending_shutdown = true;
break;
case RARCH_MENU_CTL_DESTROY:
menu_driver_pending_quick_menu = false;
menu_driver_pending_quit = false;
menu_driver_pending_shutdown = false;
menu_driver_prevent_populate = false;
menu_driver_load_no_content = false;
menu_driver_alive = false;
menu_driver_data_own = false;
menu_driver_ctx = NULL;
menu_userdata = NULL;
break;
case RARCH_MENU_CTL_PLAYLIST_FREE:
if (menu_driver_playlist)
playlist_free(menu_driver_playlist);

View File

@ -96,7 +96,6 @@ enum rarch_menu_ctl_state
RARCH_MENU_CTL_IS_TOGGLE,
RARCH_MENU_CTL_SET_TOGGLE,
RARCH_MENU_CTL_UNSET_TOGGLE,
RARCH_MENU_CTL_DESTROY,
RARCH_MENU_CTL_SET_OWN_DRIVER,
RARCH_MENU_CTL_UNSET_OWN_DRIVER,
RARCH_MENU_CTL_OWNS_DRIVER,
@ -684,6 +683,8 @@ font_data_t *menu_display_font(enum application_special_type type, float font_si
void menu_display_reset_textures_list(const char *texture_path, const char *iconpath,
uintptr_t *item, enum texture_filter_type filter_type);
void menu_driver_destroy(void);
extern uintptr_t menu_display_white_texture;
extern menu_display_ctx_driver_t menu_display_ctx_gl;