Create MENU_INPUT_CTL_DEINIT

This commit is contained in:
twinaphex 2015-12-11 11:56:31 +01:00
parent c491207b78
commit 8ea64378f8
3 changed files with 6 additions and 7 deletions

View File

@ -543,7 +543,7 @@ void menu_free(menu_handle_t *menu)
menu_shader_free(menu);
menu_input_free();
menu_input_ctl(MENU_INPUT_CTL_DEINIT, NULL);
menu_navigation_free();
menu_driver_free(menu);

View File

@ -154,9 +154,6 @@ static menu_input_t *menu_input_get_ptr(void)
void menu_input_free(void)
{
menu_input_t *menu_input = menu_input_get_ptr();
memset(menu_input, 0, sizeof(menu_input_t));
}
@ -211,6 +208,9 @@ bool menu_input_ctl(enum menu_input_ctl_state state, void *data)
switch (state)
{
case MENU_INPUT_CTL_DEINIT:
memset(menu_input, 0, sizeof(menu_input_t));
break;
case MENU_INPUT_CTL_SEARCH_START:
menu = menu_driver_get_ptr();

View File

@ -86,7 +86,8 @@ enum menu_input_ctl_state
MENU_INPUT_CTL_KEYBOARD_LABEL_SETTING,
MENU_INPUT_CTL_SET_KEYBOARD_LABEL_SETTING,
MENU_INPUT_CTL_UNSET_KEYBOARD_LABEL_SETTING,
MENU_INPUT_CTL_SEARCH_START
MENU_INPUT_CTL_SEARCH_START,
MENU_INPUT_CTL_DEINIT
};
enum menu_input_bind_mode
@ -129,8 +130,6 @@ bool menu_input_mouse_check_hitbox(int x1, int y1, int x2, int y2);
bool menu_input_ctl(enum menu_input_ctl_state state, void *data);
void menu_input_free(void);
#ifdef __cplusplus
}
#endif