mirror of
https://github.com/libretro/RetroArch.git
synced 2025-02-17 16:10:29 +00:00
Create menu_list_get_at_offset
This commit is contained in:
parent
1ece7c8228
commit
101680fd58
@ -77,7 +77,7 @@ static int menu_info_screen_iterate(unsigned action)
|
||||
else
|
||||
{
|
||||
const char *label = NULL;
|
||||
file_list_get_at_offset(driver.menu->selection_buf,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr, NULL, &label,
|
||||
&info_type);
|
||||
|
||||
@ -109,7 +109,7 @@ static int menu_action_ok(menu_file_list_cbs_t *cbs)
|
||||
if (menu_list_get_size() == 0)
|
||||
return 0;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr, &path, &label, &type);
|
||||
|
||||
if (cbs && cbs->action_ok)
|
||||
@ -195,7 +195,7 @@ static int menu_settings_iterate(unsigned action,
|
||||
|
||||
driver.menu->frame_buf_pitch = driver.menu->width * 2;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr, &path, &label, &type);
|
||||
|
||||
if (driver.menu->need_refresh && action != MENU_ACTION_MESSAGE)
|
||||
@ -491,7 +491,7 @@ static int menu_load_or_open_zip_iterate(unsigned action)
|
||||
if (menu_list_get_size() == 0)
|
||||
return 0;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf,
|
||||
driver.menu->selection_ptr, &path, NULL, &type);
|
||||
break;
|
||||
}
|
||||
|
@ -295,7 +295,7 @@ static void glui_frame(void)
|
||||
unsigned type = 0, w = 0;
|
||||
bool selected = false;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
&entry_label, &type);
|
||||
rarch_setting_t *setting = (rarch_setting_t*)setting_data_find_setting(
|
||||
driver.menu->list_settings,
|
||||
|
@ -344,7 +344,7 @@ static void rgui_render(void)
|
||||
unsigned type = 0, w = 0;
|
||||
bool selected = false;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
&entry_label, &type);
|
||||
rarch_setting_t *setting = (rarch_setting_t*)setting_data_find_setting(
|
||||
driver.menu->list_settings,
|
||||
|
@ -216,7 +216,7 @@ static void rmenu_render(void)
|
||||
unsigned type = 0, w = 0;
|
||||
bool selected = false;
|
||||
|
||||
file_list_get_at_offset(menu->selection_buf, i,
|
||||
menu_list_get_at_offset(menu->selection_buf, i,
|
||||
&path, &entry_label, &type);
|
||||
|
||||
disp_set_label(&w, type, i, label,
|
||||
|
@ -418,7 +418,7 @@ static void rmenu_xui_render(void)
|
||||
unsigned type = 0, w = 0;
|
||||
bool selected = false;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
&entry_label, &type);
|
||||
|
||||
disp_set_label(&w, type, i, label,
|
||||
|
@ -463,7 +463,7 @@ static void xmb_frame(void)
|
||||
unsigned type = 0, w = 0;
|
||||
xmb_node_t *node = NULL;
|
||||
|
||||
file_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
menu_list_get_at_offset(driver.menu->selection_buf, i, &path,
|
||||
&entry_label, &type);
|
||||
node = (xmb_node_t*)file_list_get_userdata_at_offset(
|
||||
driver.menu->selection_buf, i);
|
||||
|
@ -43,7 +43,7 @@ static inline bool entries_list_elem_is_dir(file_list_t *buf,
|
||||
const char *label = NULL;
|
||||
unsigned type = 0;
|
||||
|
||||
file_list_get_at_offset(buf, offset, &path, &label, &type);
|
||||
menu_list_get_at_offset(buf, offset, &path, &label, &type);
|
||||
|
||||
return type != MENU_FILE_PLAIN;
|
||||
}
|
||||
@ -349,7 +349,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
||||
char core_path[PATH_MAX], display_name[PATH_MAX];
|
||||
const char *path = NULL;
|
||||
|
||||
file_list_get_at_offset(list, i, &path, NULL, &type);
|
||||
menu_list_get_at_offset(list, i, &path, NULL, &type);
|
||||
if (type != MENU_FILE_CORE)
|
||||
continue;
|
||||
|
||||
|
@ -46,6 +46,12 @@ size_t menu_list_get_stack_size(void)
|
||||
return file_list_get_size(driver.menu->menu_stack);
|
||||
}
|
||||
|
||||
void menu_list_get_at_offset(const file_list_t *list, size_t index,
|
||||
const char **path, const char **label, unsigned *file_type)
|
||||
{
|
||||
file_list_get_at_offset(list, index, path, label, file_type);
|
||||
}
|
||||
|
||||
size_t menu_list_get_size(void)
|
||||
{
|
||||
if (!driver.menu)
|
||||
|
@ -38,6 +38,9 @@ void menu_list_pop_stack(file_list_t *list);
|
||||
void menu_list_pop_stack_by_needle(file_list_t *list,
|
||||
const char *needle);
|
||||
|
||||
void menu_list_get_at_offset(const file_list_t *list, size_t index,
|
||||
const char **path, const char **label, unsigned *file_type);
|
||||
|
||||
size_t menu_list_get_stack_size(void);
|
||||
|
||||
size_t menu_list_get_size(void);
|
||||
|
Loading…
x
Reference in New Issue
Block a user