Create MENU_NAVIGATION_CTL_DEINIT

This commit is contained in:
twinaphex 2015-12-11 11:57:43 +01:00
parent 8ea64378f8
commit c21c04d73b
3 changed files with 5 additions and 9 deletions

View File

@ -544,7 +544,7 @@ void menu_free(menu_handle_t *menu)
menu_shader_free(menu);
menu_input_ctl(MENU_INPUT_CTL_DEINIT, NULL);
menu_navigation_free();
menu_navigation_ctl(MENU_NAVIGATION_CTL_DEINIT, NULL);
menu_driver_free(menu);
menu_driver_ctl(RARCH_MENU_CTL_SYSTEM_INFO_DEINIT, NULL);

View File

@ -67,6 +67,9 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
switch (state)
{
case MENU_NAVIGATION_CTL_DEINIT:
memset(nav, 0, sizeof(menu_navigation_t));
break;
case MENU_NAVIGATION_CTL_CLEAR:
{
size_t idx = 0;
@ -266,9 +269,3 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
return false;
}
void menu_navigation_free(void)
{
menu_navigation_t *nav = menu_navigation_get_ptr();
memset(nav, 0, sizeof(menu_navigation_t));
}

View File

@ -26,6 +26,7 @@ extern "C" {
enum menu_navigation_ctl_state
{
MENU_NAVIGATION_CTL_CLEAR = 0,
MENU_NAVIGATION_CTL_DEINIT,
MENU_NAVIGATION_CTL_INCREMENT,
MENU_NAVIGATION_CTL_DECREMENT,
MENU_NAVIGATION_CTL_SET,
@ -42,8 +43,6 @@ enum menu_navigation_ctl_state
bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data);
void menu_navigation_free(void);
#ifdef __cplusplus
}
#endif