mirror of
https://github.com/libretro/RetroArch
synced 2025-03-08 19:14:33 +00:00
menu_entries_get_menu_stack_ptr - add idx parameter
This commit is contained in:
parent
ab9006f21e
commit
6826a3833e
@ -30,7 +30,7 @@ static int action_info_default(unsigned type, const char *label)
|
||||
int ret;
|
||||
size_t selection = 0;
|
||||
menu_displaylist_info_t info = {0};
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||
return 0;
|
||||
|
@ -129,7 +129,7 @@ static int action_left_mainmenu(unsigned type, const char *label,
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
unsigned push_list = 0;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
settings_t *settings = config_get_ptr();
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
unsigned action = MENU_ACTION_LEFT;
|
||||
|
@ -59,7 +59,7 @@ int generic_action_ok_displaylist_push(const char *path,
|
||||
global_t *global = global_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
|
||||
menu_entries_get_last_stack(&menu_path, &menu_label, NULL, NULL);
|
||||
@ -951,7 +951,7 @@ static int generic_action_ok_file_load(const char *path,
|
||||
{
|
||||
char new_path[PATH_MAX_LENGTH];
|
||||
const char *menu_path = NULL;
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
(void)id;
|
||||
|
||||
@ -1003,7 +1003,7 @@ static int action_ok_file_load(const char *path,
|
||||
const char *menu_path = NULL;
|
||||
rarch_setting_t *setting = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
menu_entries_get_last(menu_stack, &menu_path, &menu_label, NULL, NULL);
|
||||
|
||||
|
@ -157,7 +157,7 @@ static int action_right_mainmenu(unsigned type, const char *label,
|
||||
menu_file_list_cbs_t *cbs = NULL;
|
||||
unsigned push_list = 0;
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
settings_t *settings = config_get_ptr();
|
||||
unsigned action = MENU_ACTION_RIGHT;
|
||||
size_t list_size = menu_driver_list_get_size(MENU_LIST_PLAIN);
|
||||
|
@ -212,7 +212,7 @@ int generic_menu_iterate(enum menu_action action)
|
||||
uint32_t label_hash = 0;
|
||||
uint32_t hash = 0;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
menu_entries_get_last_stack(NULL, &label, NULL, NULL);
|
||||
@ -367,7 +367,7 @@ int menu_iterate_render(void)
|
||||
bool generic_menu_init_list(void *data)
|
||||
{
|
||||
menu_displaylist_info_t info = {0};
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
strlcpy(info.label, menu_hash_to_str(MENU_VALUE_MAIN_MENU), sizeof(info.label));
|
||||
|
@ -323,7 +323,7 @@ static void *xmb_list_get_entry(void *data, menu_list_type_t type, unsigned i)
|
||||
size_t list_size = 0;
|
||||
menu_handle_t *menu = (menu_handle_t*)data;
|
||||
xmb_handle_t *xmb = menu ? (xmb_handle_t*)menu->userdata : NULL;
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
switch (type)
|
||||
{
|
||||
@ -1576,7 +1576,7 @@ static void xmb_frame(void)
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
settings_t *settings = config_get_ptr();
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
if (!menu)
|
||||
return;
|
||||
@ -2477,7 +2477,7 @@ static void xmb_list_cache(menu_list_type_t type, unsigned action)
|
||||
size_t stack_size, list_size, selection;
|
||||
xmb_handle_t *xmb = NULL;
|
||||
menu_handle_t *menu = menu_driver_get_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
if (!menu)
|
||||
@ -2730,7 +2730,7 @@ static bool xmb_menu_init_list(void *data)
|
||||
{
|
||||
int ret;
|
||||
menu_displaylist_info_t info = {0};
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
strlcpy(info.label, menu_hash_to_str(MENU_VALUE_MAIN_MENU), sizeof(info.label));
|
||||
|
@ -1317,7 +1317,7 @@ static bool zarch_menu_init_list(void *data)
|
||||
{
|
||||
int ret;
|
||||
menu_displaylist_info_t info = {0};
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
file_list_t *selection_buf = menu_entries_get_selection_buf_ptr(0);
|
||||
|
||||
#if 0
|
||||
|
@ -488,20 +488,20 @@ int menu_entries_get_core_title(char *s, size_t len)
|
||||
return 0;
|
||||
}
|
||||
|
||||
file_list_t *menu_entries_get_menu_stack_ptr(void)
|
||||
file_list_t *menu_entries_get_menu_stack_ptr(size_t idx)
|
||||
{
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list)
|
||||
return NULL;
|
||||
return menu_list->menu_stack[0];
|
||||
return menu_list->menu_stack[idx];
|
||||
}
|
||||
|
||||
file_list_t *menu_entries_get_selection_buf_ptr(size_t i)
|
||||
file_list_t *menu_entries_get_selection_buf_ptr(size_t idx)
|
||||
{
|
||||
menu_list_t *menu_list = menu_list_get_ptr();
|
||||
if (!menu_list)
|
||||
return NULL;
|
||||
return menu_list->selection_buf[i];
|
||||
return menu_list->selection_buf[idx];
|
||||
}
|
||||
|
||||
bool menu_entries_needs_refresh(void)
|
||||
|
@ -125,9 +125,9 @@ void menu_entries_set_refresh(bool nonblocking);
|
||||
|
||||
void menu_entries_unset_refresh(bool nonblocking);
|
||||
|
||||
file_list_t *menu_entries_get_selection_buf_ptr(size_t i);
|
||||
file_list_t *menu_entries_get_selection_buf_ptr(size_t idx);
|
||||
|
||||
file_list_t *menu_entries_get_menu_stack_ptr(void);
|
||||
file_list_t *menu_entries_get_menu_stack_ptr(size_t idx);
|
||||
|
||||
void menu_entries_push(file_list_t *list, const char *path, const char *label,
|
||||
unsigned type, size_t directory_ptr, size_t entry_idx);
|
||||
|
@ -419,7 +419,7 @@ int menu_entry_action(menu_entry_t *entry, unsigned i, enum menu_action action)
|
||||
{
|
||||
if (cbs && cbs->action_refresh)
|
||||
{
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
cbs->action_refresh(selection_buf, menu_stack);
|
||||
menu_entries_unset_refresh(false);
|
||||
|
@ -608,7 +608,7 @@ static int menu_input_key_bind_set_mode_common(rarch_setting_t *setting,
|
||||
return -1;
|
||||
|
||||
index_offset = menu_setting_get_index_offset(setting);
|
||||
menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection);
|
||||
|
||||
|
@ -333,7 +333,7 @@ int menu_action_handle_setting(rarch_setting_t *setting,
|
||||
if (action == MENU_ACTION_OK)
|
||||
{
|
||||
size_t selection;
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
|
||||
if (!menu_navigation_ctl(MENU_NAVIGATION_CTL_GET_SELECTION, &selection))
|
||||
return -1;
|
||||
@ -2488,7 +2488,7 @@ static void general_write_handler(void *data)
|
||||
settings_t *settings = config_get_ptr();
|
||||
driver_t *driver = driver_get_ptr();
|
||||
global_t *global = global_get_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr();
|
||||
file_list_t *menu_stack = menu_entries_get_menu_stack_ptr(0);
|
||||
rarch_system_info_t *system = rarch_system_info_get_ptr();
|
||||
uint32_t hash = setting ? menu_hash_calculate(setting->name) : 0;
|
||||
uint64_t flags = menu_setting_get_flags(setting);
|
||||
|
Loading…
x
Reference in New Issue
Block a user