mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Simplify menu_driver_deferred_push_content_list
This commit is contained in:
parent
839a270a97
commit
e5045fa2e2
@ -231,15 +231,13 @@ static int action_left_goto_tab(void)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
list_info.type = MENU_LIST_HORIZONTAL;
|
||||
list_info.action = MENU_ACTION_LEFT;
|
||||
|
||||
menu_driver_list_cache(&list_info);
|
||||
|
||||
return menu_driver_deferred_push_content_list(selection_buf, menu_stack,
|
||||
"", "", 0);
|
||||
return menu_driver_deferred_push_content_list(selection_buf);
|
||||
}
|
||||
|
||||
static int action_left_mainmenu(unsigned type, const char *label,
|
||||
|
@ -256,15 +256,13 @@ static int action_right_goto_tab(void)
|
||||
{
|
||||
menu_ctx_list_t list_info;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
list_info.type = MENU_LIST_HORIZONTAL;
|
||||
list_info.action = MENU_ACTION_RIGHT;
|
||||
|
||||
menu_driver_list_cache(&list_info);
|
||||
|
||||
return menu_driver_deferred_push_content_list(selection_buf, menu_stack,
|
||||
"", "", 0);
|
||||
return menu_driver_deferred_push_content_list(selection_buf);
|
||||
}
|
||||
|
||||
static int action_right_mainmenu(unsigned type, const char *label,
|
||||
|
@ -8475,21 +8475,19 @@ static int materialui_switch_tabs(
|
||||
if (!target_tab->active)
|
||||
{
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
bool stack_flushed = false;
|
||||
int ret = 0;
|
||||
|
||||
/* Sanity check */
|
||||
if (!selection_buf || !menu_stack)
|
||||
if (!selection_buf)
|
||||
return -1;
|
||||
|
||||
/* Perform pre-switch operations */
|
||||
stack_flushed = materialui_preswitch_tabs(mui, target_tab);
|
||||
|
||||
/* Perform switch */
|
||||
ret = menu_driver_deferred_push_content_list(
|
||||
selection_buf, menu_stack, "", "", 0);
|
||||
ret = menu_driver_deferred_push_content_list(
|
||||
selection_buf);
|
||||
|
||||
/* Note: If materialui_preswitch_tabs() flushes
|
||||
* the stack, then both materialui_preswitch_tabs()
|
||||
|
@ -752,7 +752,6 @@ void ozone_change_tab(ozone_handle_t *ozone,
|
||||
{
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
size_t selection = menu_navigation_get_selection();
|
||||
size_t stack_size = menu_stack->size;
|
||||
|
||||
if (menu_stack->list[stack_size - 1].label)
|
||||
@ -767,7 +766,7 @@ void ozone_change_tab(ozone_handle_t *ozone,
|
||||
ozone_list_cache(ozone, MENU_LIST_HORIZONTAL,
|
||||
MENU_ACTION_LEFT);
|
||||
|
||||
menu_driver_deferred_push_content_list(selection_buf, menu_stack, "", "", 0);
|
||||
menu_driver_deferred_push_content_list(selection_buf);
|
||||
}
|
||||
|
||||
void ozone_init_horizontal_list(ozone_handle_t *ozone)
|
||||
|
@ -477,10 +477,7 @@ void menu_driver_frame(bool menu_is_alive, video_frame_info_t *video_info);
|
||||
bool menu_driver_iterate(menu_ctx_iterate_t *iterate,
|
||||
retro_time_t current_time);
|
||||
|
||||
int menu_driver_deferred_push_content_list(
|
||||
void *data, void *userdata,
|
||||
const char *path,
|
||||
const char *label, unsigned type);
|
||||
int menu_driver_deferred_push_content_list(file_list_t *list);
|
||||
|
||||
bool menu_driver_list_cache(menu_ctx_list_t *list);
|
||||
|
||||
|
@ -4097,10 +4097,7 @@ bool menu_driver_iterate(menu_ctx_iterate_t *iterate,
|
||||
return false;
|
||||
}
|
||||
|
||||
int menu_driver_deferred_push_content_list(
|
||||
void *data, void *userdata,
|
||||
const char *path,
|
||||
const char *label, unsigned type)
|
||||
int menu_driver_deferred_push_content_list(file_list_t *list)
|
||||
{
|
||||
menu_displaylist_ctx_entry_t entry;
|
||||
struct rarch_state *p_rarch = &rarch_st;
|
||||
@ -4121,7 +4118,7 @@ int menu_driver_deferred_push_content_list(
|
||||
|
||||
menu_st->selection_ptr = 0;
|
||||
|
||||
entry.list = (file_list_t*)data;
|
||||
entry.list = list;
|
||||
entry.stack = selection_buf;
|
||||
if (!menu_displaylist_push(&entry))
|
||||
return -1;
|
||||
|
Loading…
x
Reference in New Issue
Block a user