mirror of
https://github.com/libretro/RetroArch
synced 2025-02-06 09:40:06 +00:00
Refactor away menu_navigation_set_last
This commit is contained in:
parent
4d2bbc9a3c
commit
14c463dae2
@ -133,7 +133,7 @@ static int action_right_scroll(unsigned type, const char *label,
|
||||
else
|
||||
{
|
||||
if ((menu_list_get_size(menu_list) > 0))
|
||||
menu_navigation_set_last(nav);
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_LAST, NULL);
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
@ -114,6 +114,7 @@ bool menu_navigation_ctl(enum menu_navigation_ctl_state state, void *data)
|
||||
}
|
||||
return true;
|
||||
case MENU_NAVIGATION_CTL_SET_LAST:
|
||||
nav->selection_ptr = menu_list_get_size(menu_list) - 1;
|
||||
if (driver->navigation_set_last)
|
||||
driver->navigation_set_last();
|
||||
return true;
|
||||
@ -177,22 +178,6 @@ void menu_navigation_set(menu_navigation_t *nav,
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET, &scroll);
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_navigation_set_last:
|
||||
*
|
||||
* Sets navigation pointer to last index.
|
||||
**/
|
||||
void menu_navigation_set_last(menu_navigation_t *nav)
|
||||
{
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list || !nav)
|
||||
return;
|
||||
|
||||
nav->selection_ptr = menu_list_get_size(menu_list) - 1;
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_SET_LAST, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* menu_navigation_descend_alphabet:
|
||||
* @ptr_out : Amount of indices to 'scroll' to get
|
||||
|
@ -72,13 +72,6 @@ void menu_navigation_clear(menu_navigation_t *nav, bool pending_push);
|
||||
**/
|
||||
void menu_navigation_set(menu_navigation_t *nav, size_t i, bool scroll);
|
||||
|
||||
/**
|
||||
* menu_navigation_set_last:
|
||||
*
|
||||
* Sets navigation pointer to last index.
|
||||
**/
|
||||
void menu_navigation_set_last(menu_navigation_t *nav);
|
||||
|
||||
/**
|
||||
* menu_navigation_descend_alphabet:
|
||||
* @ptr_out : Amount of indices to 'scroll' to get
|
||||
|
Loading…
x
Reference in New Issue
Block a user