mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-18 00:32:46 +00:00
Add more state to RARCH_MENU_CTL_DEINIT
This commit is contained in:
parent
1e05027785
commit
9bb1127727
6
driver.c
6
driver.c
@ -387,11 +387,7 @@ static void uninit_drivers(int flags)
|
||||
{
|
||||
#ifdef HAVE_MENU
|
||||
if (flags & DRIVER_MENU)
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_CONTEXT_DESTROY, NULL);
|
||||
if (!menu_driver_ctl(RARCH_MENU_CTL_OWNS_DRIVER, NULL))
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
|
||||
}
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
|
||||
#endif
|
||||
|
||||
if ((flags & DRIVER_LOCATION) && !location_driver_ctl(RARCH_LOCATION_CTL_OWNS_DRIVER, NULL))
|
||||
|
@ -530,6 +530,9 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
case RARCH_MENU_CTL_OWNS_DRIVER:
|
||||
return menu_driver_data_own;
|
||||
case RARCH_MENU_CTL_DEINIT:
|
||||
menu_driver_ctl(RARCH_MENU_CTL_CONTEXT_DESTROY, NULL);
|
||||
if (menu_driver_ctl(RARCH_MENU_CTL_OWNS_DRIVER, NULL))
|
||||
return true;
|
||||
if (menu_driver_data)
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_FREE, NULL);
|
||||
@ -563,7 +566,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
|
||||
|
||||
if (!menu_driver_data || !menu_init())
|
||||
{
|
||||
menu_driver_ctl(RARCH_MENU_CTL_DEINIT, NULL);
|
||||
retro_fail(1, "init_menu()");
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user