RARCH_MENU_CTL_DESTROY: Make sure all static local variables are

set back to default state
This commit is contained in:
twinaphex 2015-12-06 18:23:46 +01:00
parent 718ed30d70
commit bea3f938d9

View File

@ -650,6 +650,11 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
switch (state) switch (state)
{ {
case RARCH_MENU_CTL_DESTROY:
menu_driver_alive = false;
menu_driver_data_own = false;
menu_driver_ctx = NULL;
break;
case RARCH_MENU_CTL_SET_TOGGLE: case RARCH_MENU_CTL_SET_TOGGLE:
menu_driver_toggle(true); menu_driver_toggle(true);
break; break;
@ -664,9 +669,6 @@ bool menu_driver_ctl(enum rarch_menu_ctl_state state, void *data)
break; break;
case RARCH_MENU_CTL_IS_ALIVE: case RARCH_MENU_CTL_IS_ALIVE:
return menu_driver_alive; return menu_driver_alive;
case RARCH_MENU_CTL_DESTROY:
menu_driver_ctx = NULL;
break;
case RARCH_MENU_CTL_SET_OWN_DRIVER: case RARCH_MENU_CTL_SET_OWN_DRIVER:
menu_driver_data_own = true; menu_driver_data_own = true;
break; break;