(menu_entry.c) Cleanup

This commit is contained in:
twinaphex 2015-09-25 17:59:22 +02:00
parent 62649c01f7
commit 5ee616f1f5

View File

@ -33,11 +33,15 @@
/* Clicks the back button */
int menu_entry_go_back(void)
{
size_t new_selection_ptr;
menu_list_t *menu_list = menu_list_get_ptr();
menu_navigation_t *nav = menu_navigation_get_ptr();
if (!menu_list)
return -1;
menu_list_pop_stack(menu_list, &nav->selection_ptr);
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
menu_list_pop_stack(menu_list, &new_selection_ptr);
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
return 0;
}