mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-01-27 06:11:51 +00:00
Use menu_list_get_ptr less
This commit is contained in:
parent
ce4ad6d3ab
commit
933418db2b
@ -98,9 +98,6 @@ static int action_left_scroll(unsigned type, const char *label,
|
|||||||
size_t selection;
|
size_t selection;
|
||||||
size_t scroll_accel = 0;
|
size_t scroll_accel = 0;
|
||||||
unsigned scroll_speed = 0, fast_scroll_speed = 0;
|
unsigned scroll_speed = 0, fast_scroll_speed = 0;
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
|
||||||
if (!menu_list)
|
|
||||||
return -1;
|
|
||||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||||
return -1;
|
return -1;
|
||||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SCROLL_ACCEL, &scroll_accel))
|
||||||
@ -131,10 +128,11 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
|||||||
size_t selection = 0;
|
size_t selection = 0;
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
menu_file_list_cbs_t *cbs = NULL;
|
||||||
unsigned push_list = 0;
|
unsigned push_list = 0;
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
||||||
menu_handle_t *menu = menu_driver_get_ptr();
|
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||||
unsigned action = MENU_ACTION_LEFT;
|
menu_handle_t *menu = menu_driver_get_ptr();
|
||||||
size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN);
|
unsigned action = MENU_ACTION_LEFT;
|
||||||
|
size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN);
|
||||||
if (!menu)
|
if (!menu)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
@ -149,7 +147,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
|||||||
|
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf,
|
cbs = menu_list_get_actiondata_at_offset(selection_buf,
|
||||||
selection);
|
selection);
|
||||||
|
|
||||||
switch (push_list)
|
switch (push_list)
|
||||||
@ -159,8 +157,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
|||||||
|
|
||||||
if (cbs && cbs->action_content_list_switch)
|
if (cbs && cbs->action_content_list_switch)
|
||||||
return cbs->action_content_list_switch(
|
return cbs->action_content_list_switch(
|
||||||
menu_list->selection_buf, menu_list->menu_stack,
|
selection_buf, menu_stack, "", "", 0);
|
||||||
"", "", 0);
|
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
action_left_scroll(0, "", false);
|
action_left_scroll(0, "", false);
|
||||||
|
@ -159,7 +159,8 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
|||||||
size_t selection = 0;
|
size_t selection = 0;
|
||||||
menu_file_list_cbs_t *cbs = NULL;
|
menu_file_list_cbs_t *cbs = NULL;
|
||||||
unsigned push_list = 0;
|
unsigned push_list = 0;
|
||||||
menu_list_t *menu_list = menu_list_get_ptr();
|
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr();
|
||||||
|
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||||
unsigned action = MENU_ACTION_RIGHT;
|
unsigned action = MENU_ACTION_RIGHT;
|
||||||
size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN);
|
size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN);
|
||||||
|
|
||||||
@ -174,7 +175,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
|||||||
|
|
||||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||||
|
|
||||||
cbs = menu_list_get_actiondata_at_offset(menu_list->selection_buf, selection);
|
cbs = menu_list_get_actiondata_at_offset(selection_buf, selection);
|
||||||
|
|
||||||
switch (push_list)
|
switch (push_list)
|
||||||
{
|
{
|
||||||
@ -182,8 +183,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
|||||||
menu_driver_list_cache(MENU_LIST_HORIZONTAL, action);
|
menu_driver_list_cache(MENU_LIST_HORIZONTAL, action);
|
||||||
|
|
||||||
if (cbs && cbs->action_content_list_switch)
|
if (cbs && cbs->action_content_list_switch)
|
||||||
return cbs->action_content_list_switch(
|
return cbs->action_content_list_switch(selection_buf, menu_stack,
|
||||||
menu_list->selection_buf, menu_list->menu_stack,
|
|
||||||
"", "", 0);
|
"", "", 0);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user