Don't use menu_navigation_get_ptr
This commit is contained in:
parent
1d81096af7
commit
1932e65dde
|
@ -19,13 +19,15 @@
|
|||
|
||||
static int action_bind_down_generic(unsigned type, const char *label)
|
||||
{
|
||||
size_t scroll_accel = 0;
|
||||
unsigned scroll_speed = 0;
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list || !nav)
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return -1;
|
||||
|
||||
scroll_speed = (max(nav->scroll.acceleration, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (max(scroll_accel, 2) - 2) / 4 + 1;
|
||||
|
||||
if (menu_list_get_size(menu_list) <= 0)
|
||||
return 0;
|
||||
|
|
|
@ -21,15 +21,17 @@
|
|||
|
||||
static int action_info_default(unsigned type, const char *label)
|
||||
{
|
||||
size_t selection = 0;
|
||||
menu_displaylist_info_t info = {0};
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
|
||||
if (!menu_list)
|
||||
return 0;
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||
return 0;
|
||||
|
||||
info.list = menu_list->menu_stack;
|
||||
info.directory_ptr = nav->selection_ptr;
|
||||
info.directory_ptr = selection;
|
||||
strlcpy(info.label,
|
||||
menu_hash_to_str(MENU_LABEL_INFO_SCREEN),
|
||||
sizeof(info.label));
|
||||
|
|
|
@ -19,13 +19,15 @@
|
|||
|
||||
static int action_bind_up_generic(unsigned type, const char *label)
|
||||
{
|
||||
size_t scroll_accel = 0;
|
||||
unsigned scroll_speed = 0;
|
||||
menu_navigation_t *nav = menu_navigation_get_ptr();
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list)
|
||||
return -1;
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||
return -1;
|
||||
|
||||
scroll_speed = (max(nav->scroll.acceleration, 2) - 2) / 4 + 1;
|
||||
scroll_speed = (max(scroll_accel, 2) - 2) / 4 + 1;
|
||||
|
||||
if (menu_list_get_size(menu_list) <= 0)
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue