mirror of
https://github.com/libretro/RetroArch.git
synced 2024-12-12 02:44:00 +00:00
Revert "Refactor code to no longer need menu_navigation_get_ptr"
This reverts commit a7b83cfd45
.
This commit is contained in:
parent
2a719d2a9c
commit
40c6ec3790
@ -33,16 +33,11 @@
|
||||
/* 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_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);
|
||||
|
||||
menu_list_pop_stack(menu_list, &nav->selection_ptr);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -354,7 +349,6 @@ int menu_entry_select(uint32_t i)
|
||||
|
||||
int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
||||
{
|
||||
size_t new_selection_ptr;
|
||||
int ret = 0;
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
@ -371,14 +365,10 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
||||
ret = cbs->action_down(entry->type, entry->label);
|
||||
break;
|
||||
case MENU_ACTION_SCROLL_UP:
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
|
||||
menu_navigation_descend_alphabet(nav, &new_selection_ptr);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
|
||||
menu_navigation_descend_alphabet(nav, &nav->selection_ptr);
|
||||
break;
|
||||
case MENU_ACTION_SCROLL_DOWN:
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
|
||||
menu_navigation_ascend_alphabet(nav, &new_selection_ptr);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
|
||||
menu_navigation_ascend_alphabet(nav, &nav->selection_ptr);
|
||||
break;
|
||||
|
||||
case MENU_ACTION_CANCEL:
|
||||
|
@ -150,6 +150,7 @@ void menu_list_flush_stack(menu_list_t *list,
|
||||
const char *label = NULL;
|
||||
unsigned type = 0;
|
||||
size_t entry_idx = 0;
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
@ -160,12 +161,7 @@ void menu_list_flush_stack(menu_list_t *list,
|
||||
while (menu_list_flush_stack_type(
|
||||
needle, label, type, final_type) != 0)
|
||||
{
|
||||
size_t new_selection_ptr;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &new_selection_ptr);
|
||||
menu_list_pop(list->menu_stack, &new_selection_ptr);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_SELECTION, &new_selection_ptr);
|
||||
|
||||
menu_list_pop(list->menu_stack, &nav->selection_ptr);
|
||||
menu_list_get_last(list->menu_stack,
|
||||
&path, &label, &type, &entry_idx);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user