From 5bd138b6ac17ef9e20c56b04c745453f97e21983 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 10 Jun 2015 22:43:06 +0200 Subject: [PATCH] (file_list) Start adding entry_idx to file_list_* functions --- libretro-common/file/file_list.c | 23 +- libretro-common/include/file/file_list.h | 10 +- menu/cbs/menu_entries_cbs_iterate.c | 16 +- menu/cbs/menu_entries_cbs_ok.c | 28 +- menu/cbs/menu_entries_cbs_scan.c | 4 +- menu/drivers/xmb.c | 2 +- menu/menu_displaylist.c | 364 +++++++++++------------ menu/menu_entries.c | 2 +- menu/menu_entry.c | 21 +- menu/menu_list.c | 42 +-- menu/menu_list.h | 10 +- 11 files changed, 276 insertions(+), 246 deletions(-) diff --git a/libretro-common/file/file_list.c b/libretro-common/file/file_list.c index 2a59da0df4..a2e534d8e4 100644 --- a/libretro-common/file/file_list.c +++ b/libretro-common/file/file_list.c @@ -28,7 +28,8 @@ void file_list_push(file_list_t *list, const char *path, const char *label, - unsigned type, size_t directory_ptr) + unsigned type, size_t directory_ptr, + size_t entry_idx) { if (list->size >= list->capacity) { @@ -47,6 +48,7 @@ void file_list_push(file_list_t *list, list->list[list->size].alt = NULL; list->list[list->size].type = type; list->list[list->size].directory_ptr = directory_ptr; + list->list[list->size].entry_idx = entry_idx; if (label) list->list[list->size].label = strdup(label); @@ -63,6 +65,15 @@ size_t file_list_get_size(const file_list_t *list) return list->size; } +size_t file_list_get_entry_index(const file_list_t *list) +{ + size_t size = 0; + if (!list) + return 0; + size = file_list_get_size(list); + return list->list[size].entry_idx; +} + size_t file_list_get_directory_ptr(const file_list_t *list) { size_t size = file_list_get_size(list); @@ -167,6 +178,7 @@ void file_list_copy(file_list_t *list, file_list_t *list_old) list_old->list[i].alt = NULL; list_old->list[i].type = list->list[i].type; list_old->list[i].directory_ptr = list->list[i].directory_ptr; + list_old->list[i].entry_idx = list->list[i].entry_idx; list_old->list[i].userdata = list->list[i].userdata; list_old->list[i].actiondata = list->list[i].actiondata; @@ -282,7 +294,8 @@ void *file_list_get_last_actiondata(const file_list_t *list) } void file_list_get_at_offset(const file_list_t *list, size_t idx, - const char **path, const char **label, unsigned *file_type) + const char **path, const char **label, unsigned *file_type, + size_t *entry_idx) { if (!list) return; @@ -293,17 +306,19 @@ void file_list_get_at_offset(const file_list_t *list, size_t idx, *label = list->list[idx].label; if (file_type) *file_type = list->list[idx].type; + if (entry_idx) + *entry_idx = list->list[idx].entry_idx; } void file_list_get_last(const file_list_t *list, const char **path, const char **label, - unsigned *file_type) + unsigned *file_type, size_t *entry_idx) { if (!list) return; if (list->size) - file_list_get_at_offset(list, list->size - 1, path, label, file_type); + file_list_get_at_offset(list, list->size - 1, path, label, file_type, entry_idx); } bool file_list_search(const file_list_t *list, const char *needle, size_t *idx) diff --git a/libretro-common/include/file/file_list.h b/libretro-common/include/file/file_list.h index 95983f3e91..616d5f139c 100644 --- a/libretro-common/include/file/file_list.h +++ b/libretro-common/include/file/file_list.h @@ -36,6 +36,7 @@ struct item_file char *alt; unsigned type; size_t directory_ptr; + size_t entry_idx; void *userdata; void *actiondata; }; @@ -58,7 +59,8 @@ void *file_list_get_actiondata_at_offset(const file_list_t *list, void file_list_free(file_list_t *list); void file_list_push(file_list_t *userdata, const char *path, - const char *label, unsigned type, size_t current_directory_ptr); + const char *label, unsigned type, size_t current_directory_ptr, + size_t entry_index); void file_list_pop(file_list_t *list, size_t *directory_ptr); @@ -68,17 +70,19 @@ void file_list_copy(file_list_t *list, file_list_t *list_old); void file_list_get_last(const file_list_t *list, const char **path, const char **label, - unsigned *type); + unsigned *type, size_t *entry_idx); void *file_list_get_last_actiondata(const file_list_t *list); size_t file_list_get_size(const file_list_t *list); +size_t file_list_get_entry_index(const file_list_t *list); + size_t file_list_get_directory_ptr(const file_list_t *list); void file_list_get_at_offset(const file_list_t *list, size_t index, const char **path, const char **label, - unsigned *type); + unsigned *type, size_t *entry_idx); void file_list_set_label_at_offset(file_list_t *list, size_t index, const char *label); diff --git a/menu/cbs/menu_entries_cbs_iterate.c b/menu/cbs/menu_entries_cbs_iterate.c index 9dedc5c9d2..c202703c34 100644 --- a/menu/cbs/menu_entries_cbs_iterate.c +++ b/menu/cbs/menu_entries_cbs_iterate.c @@ -38,6 +38,7 @@ static int archive_open(void) const char *menu_label = NULL; const char* path = NULL; unsigned int type = 0; + size_t entry_idx = 0; menu_navigation_t *nav = menu_navigation_get_ptr(); menu_list_t *menu_list = menu_list_get_ptr(); @@ -47,13 +48,13 @@ static int archive_open(void) menu_list_pop_stack(menu_list); menu_list_get_last_stack(menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); if (menu_list_get_size(menu_list) == 0) return 0; menu_list_get_at_offset(menu_list->selection_buf, - nav->selection_ptr, &path, NULL, &type); + nav->selection_ptr, &path, NULL, &type, &entry_idx); fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path)); @@ -76,6 +77,7 @@ static int archive_load(void) const char *menu_path = NULL; const char *menu_label = NULL; const char* path = NULL; + size_t entry_idx = 0; menu_handle_t *menu = menu_driver_get_ptr(); settings_t *settings = config_get_ptr(); global_t *global = global_get_ptr(); @@ -87,13 +89,13 @@ static int archive_load(void) menu_list_pop_stack(menu->menu_list); menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); if (menu_list_get_size(menu->menu_list) == 0) return 0; menu_list_get_at_offset(menu->menu_list->selection_buf, - selected, &path, NULL, NULL); + selected, &path, NULL, NULL, &entry_idx); ret = rarch_defer_core(global->core_info, menu_path, path, menu_label, menu->deferred_path, sizeof(menu->deferred_path)); @@ -240,7 +242,7 @@ static int action_iterate_info(char *s, size_t len, const char *label) else { const char *lbl = NULL; - menu_list_get_at_offset(list, selection, NULL, &lbl, &info_type); + menu_list_get_at_offset(list, selection, NULL, &lbl, &info_type, NULL); if (lbl) strlcpy(needle, lbl, sizeof(needle)); @@ -286,7 +288,7 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label, if (!menu) return -1; - menu_list_get_last_stack(menu_list, NULL, NULL, &type); + menu_list_get_last_stack(menu_list, NULL, NULL, &type, NULL); geom = (struct retro_game_geometry*)&av_info->geometry; @@ -407,7 +409,7 @@ static int action_iterate_menu_viewport(char *s, size_t len, const char *label, break; } - menu_list_get_last_stack(menu_list, NULL, &label, &type); + menu_list_get_last_stack(menu_list, NULL, &label, &type, NULL); menu_driver_render(); diff --git a/menu/cbs/menu_entries_cbs_ok.c b/menu/cbs/menu_entries_cbs_ok.c index b49166dbc1..f8e1e76f00 100644 --- a/menu/cbs/menu_entries_cbs_ok.c +++ b/menu/cbs/menu_entries_cbs_ok.c @@ -59,7 +59,7 @@ static int rarch_defer_core_wrapper(menu_displaylist_info_t *info, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); ret = rarch_defer_core(global->core_info, menu_path, path, menu_label, menu->deferred_path, @@ -240,7 +240,7 @@ static int action_ok_shader_pass_load(const char *path, #ifdef HAVE_SHADER_MANAGER menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(menu->shader->pass[hack_shader_pass].source.path, menu_path, path, @@ -604,7 +604,7 @@ static int action_ok_record_configfile_load(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(global->record.config, menu_path, path, sizeof(global->record.config)); @@ -625,7 +625,7 @@ static int action_ok_remap_file_load(const char *path, (void)menu_path; menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(remap_path, menu_path, path, sizeof(remap_path)); input_remapping_load_file(remap_path); @@ -650,7 +650,7 @@ static int action_ok_video_filter_file_load(const char *path, (void)menu_path; menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(filter_path, menu_path, path, sizeof(filter_path)); @@ -677,7 +677,7 @@ static int action_ok_cheat_file_load(const char *path, (void)cheat_path; (void)menu_path; menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(cheat_path, menu_path, path, sizeof(cheat_path)); @@ -707,7 +707,7 @@ static int action_ok_menu_wallpaper_load(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, &menu_path, &menu_label, - NULL); + NULL, NULL); setting = menu_setting_find(menu_label); @@ -742,7 +742,7 @@ static int action_ok_shader_preset_load(const char *path, (void)menu_path; #ifdef HAVE_SHADER_MANAGER menu_list_get_last_stack(menu->menu_list, &menu_path, NULL, - NULL); + NULL, NULL); fill_pathname_join(shader_path, menu_path, path, sizeof(shader_path)); menu_shader_manager_set_preset(menu->shader, @@ -947,7 +947,7 @@ static int action_ok_core_load(const char *path, (void)global; menu_list_get_last_stack(menu->menu_list, - &menu_path, NULL, NULL); + &menu_path, NULL, NULL, NULL); fill_pathname_join(settings->libretro, menu_path, path, sizeof(settings->libretro)); @@ -1010,7 +1010,7 @@ static int action_ok_directory_push(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); fill_pathname_join(cat_path, menu_path, path, sizeof(cat_path)); @@ -1084,7 +1084,7 @@ static int action_ok_config_load(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, NULL, NULL); + &menu_path, NULL, NULL, NULL); fill_pathname_join(config, menu_path, path, sizeof(config)); menu_list_flush_stack(menu->menu_list, NULL, MENU_SETTINGS); @@ -1109,7 +1109,7 @@ static int action_ok_disk_image_append(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, NULL, NULL); + &menu_path, NULL, NULL, NULL); fill_pathname_join(image, menu_path, path, sizeof(image)); event_disk_control_append_image(image); @@ -1134,7 +1134,7 @@ static int action_ok_file_load(const char *path, return -1; menu_list_get_last(menu->menu_list->menu_stack, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); setting = menu_setting_find(menu_label); @@ -1172,7 +1172,7 @@ static int action_ok_set_path(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); setting = menu_setting_find(menu_label); diff --git a/menu/cbs/menu_entries_cbs_scan.c b/menu/cbs/menu_entries_cbs_scan.c index d274d1fb11..06fa8a70ad 100644 --- a/menu/cbs/menu_entries_cbs_scan.c +++ b/menu/cbs/menu_entries_cbs_scan.c @@ -31,7 +31,7 @@ static int action_scan_file(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); fill_pathname_join(fullpath, menu_path, path, sizeof(fullpath)); @@ -50,7 +50,7 @@ static int action_scan_directory(const char *path, return -1; menu_list_get_last_stack(menu->menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); fill_pathname_join(fullpath, menu_path, path, sizeof(fullpath)); diff --git a/menu/drivers/xmb.c b/menu/drivers/xmb.c index 6a239e0bee..8c8b22ff49 100644 --- a/menu/drivers/xmb.c +++ b/menu/drivers/xmb.c @@ -1014,7 +1014,7 @@ static void xmb_draw_items(xmb_handle_t *xmb, gl_t *gl, video_driver_get_size(&width, &height); - file_list_get_last(stack, NULL, &label, NULL); + file_list_get_last(stack, NULL, &label, NULL, NULL); if (cat_selection_ptr) core_node = xmb_get_userdata_from_horizontal_list(xmb, cat_selection_ptr - 1); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 36c74fd7dc..39a1cd70b9 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -68,7 +68,7 @@ static void print_buf_lines(file_list_t *list, char *buf, int buf_size, line_start[ln] = '\0'; menu_list_push(list, line_start, "", - type, 0); + type, 0, 0); /* Restore the saved char */ *(buf + i + 1) = c; @@ -92,7 +92,7 @@ static void menu_displaylist_push_perfcounter( for (i = 0; i < num; i++) if (counters[i] && counters[i]->ident) menu_list_push(info->list, - counters[i]->ident, "", id + i, 0); + counters[i]->ident, "", id + i, 0, 0); } /** @@ -112,28 +112,28 @@ static void menu_displaylist_parse_drive_list(file_list_t *list) #if defined(GEKKO) #ifdef HW_RVL menu_list_push(list, - "sd:/", "", MENU_FILE_DIRECTORY, 0); + "sd:/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "usb:/", "", MENU_FILE_DIRECTORY, 0); + "usb:/", "", MENU_FILE_DIRECTORY, 0, 0); #endif menu_list_push(list, - "carda:/", "", MENU_FILE_DIRECTORY, 0); + "carda:/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "cardb:/", "", MENU_FILE_DIRECTORY, 0); + "cardb:/", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(_XBOX1) menu_list_push(list, - "C:", "", MENU_FILE_DIRECTORY, 0); + "C:", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "D:", "", MENU_FILE_DIRECTORY, 0); + "D:", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "E:", "", MENU_FILE_DIRECTORY, 0); + "E:", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "F:", "", MENU_FILE_DIRECTORY, 0); + "F:", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "G:", "", MENU_FILE_DIRECTORY, 0); + "G:", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(_XBOX360) menu_list_push(list, - "game:", "", MENU_FILE_DIRECTORY, 0); + "game:", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(_WIN32) unsigned drives = GetLogicalDrives(); char drive[] = " :\\"; @@ -142,53 +142,53 @@ static void menu_displaylist_parse_drive_list(file_list_t *list) drive[0] = 'A' + i; if (drives & (1 << i)) menu_list_push(list, - drive, "", MENU_FILE_DIRECTORY, 0); + drive, "", MENU_FILE_DIRECTORY, 0, 0); } #elif defined(__CELLOS_LV2__) menu_list_push(list, - "/app_home/", "", MENU_FILE_DIRECTORY, 0); + "/app_home/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_hdd0/", "", MENU_FILE_DIRECTORY, 0); + "/dev_hdd0/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_hdd1/", "", MENU_FILE_DIRECTORY, 0); + "/dev_hdd1/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/host_root/", "", MENU_FILE_DIRECTORY, 0); + "/host_root/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb000/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb000/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb001/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb001/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb002/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb002/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb003/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb003/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb004/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb004/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb005/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb005/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/dev_usb006/", "", MENU_FILE_DIRECTORY, 0); + "/dev_usb006/", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(PSP) menu_list_push(list, - "ms0:/", "", MENU_FILE_DIRECTORY, 0); + "ms0:/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "ef0:/", "", MENU_FILE_DIRECTORY, 0); + "ef0:/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "host0:/", "", MENU_FILE_DIRECTORY, 0); + "host0:/", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(_3DS) menu_list_push(list, - "sdmc:/", "", MENU_FILE_DIRECTORY, 0); + "sdmc:/", "", MENU_FILE_DIRECTORY, 0, 0); #elif defined(IOS) menu_list_push(list, - "/var/mobile/Documents/", "", MENU_FILE_DIRECTORY, 0); + "/var/mobile/Documents/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - "/var/mobile/", "", MENU_FILE_DIRECTORY, 0); + "/var/mobile/", "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, - g_defaults.core_dir, "", MENU_FILE_DIRECTORY, 0); + g_defaults.core_dir, "", MENU_FILE_DIRECTORY, 0, 0); menu_list_push(list, "/", "", - MENU_FILE_DIRECTORY, 0); + MENU_FILE_DIRECTORY, 0, 0); #else menu_list_push(list, "/", "", - MENU_FILE_DIRECTORY, 0); + MENU_FILE_DIRECTORY, 0, 0); #endif } @@ -206,19 +206,19 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Core name: %s", core_info->core_name ? core_info->core_name : ""); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(tmp, sizeof(tmp), "Core label: %s", core_info->display_name ? core_info->display_name : ""); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); if (core_info->systemname) { snprintf(tmp, sizeof(tmp), "System name: %s", core_info->systemname); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->system_manufacturer) @@ -226,7 +226,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "System manufacturer: %s", core_info->system_manufacturer); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->categories_list) @@ -235,7 +235,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) string_list_join_concat(tmp, sizeof(tmp), core_info->categories_list, ", "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->authors_list) @@ -244,7 +244,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) string_list_join_concat(tmp, sizeof(tmp), core_info->authors_list, ", "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->permissions_list) @@ -253,7 +253,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) string_list_join_concat(tmp, sizeof(tmp), core_info->permissions_list, ", "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->licenses_list) @@ -262,7 +262,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) string_list_join_concat(tmp, sizeof(tmp), core_info->licenses_list, ", "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->supported_extensions_list) @@ -271,7 +271,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) string_list_join_concat(tmp, sizeof(tmp), core_info->supported_extensions_list, ", "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (core_info->firmware_count > 0) @@ -281,7 +281,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) settings->system_directory); menu_list_push(info->list, "Firmware: ", "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); for (i = 0; i < core_info->firmware_count; i++) { if (core_info->firmware[i].desc) @@ -290,7 +290,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) core_info->firmware[i].desc ? core_info->firmware[i].desc : ""); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(tmp, sizeof(tmp), " status: %s, %s", core_info->firmware[i].missing ? @@ -298,7 +298,7 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) core_info->firmware[i].optional ? "optional" : "required"); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } } } @@ -307,21 +307,21 @@ static int menu_displaylist_parse_core_info(menu_displaylist_info_t *info) { snprintf(tmp, sizeof(tmp), "Core notes: "); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); for (i = 0; i < core_info->note_list->size; i++) { snprintf(tmp, sizeof(tmp), " %s", core_info->note_list->elems[i].data); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } } } else menu_list_push(info->list, "No information available.", "", - 0, 0); + 0, 0, 0); return 0; } @@ -336,18 +336,18 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Build date: %s", __DATE__); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); (void)tmp_string; #ifdef HAVE_GIT_VERSION snprintf(tmp, sizeof(tmp), "Git version: %s", rarch_git_version); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); #endif rarch_info_get_capabilities(RARCH_CAPABILITIES_COMPILER, tmp, sizeof(tmp)); - menu_list_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0); + menu_list_push(info->list, tmp, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0); { char cpu_str[PATH_MAX_LENGTH]; @@ -355,7 +355,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(cpu_str, sizeof(cpu_str), "CPU Features: "); rarch_info_get_capabilities(RARCH_CAPABILITIES_CPU, cpu_str, sizeof(cpu_str)); - menu_list_push(info->list, cpu_str, "", MENU_SETTINGS_CORE_INFO_NONE, 0); + menu_list_push(info->list, cpu_str, "", MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (frontend) @@ -365,7 +365,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Frontend identifier: %s", frontend->ident); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); if (frontend->get_name) { @@ -373,7 +373,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Frontend name: %s", frontend->get_name ? tmp2 : "N/A"); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (frontend->get_os) @@ -382,13 +382,13 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Frontend OS: %s %d.%d", frontend->get_os ? tmp2 : "N/A", major, minor); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } snprintf(tmp, sizeof(tmp), "RetroRating level: %d", frontend->get_rating ? frontend->get_rating() : -1); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); if (frontend->get_powerstate) { @@ -422,7 +422,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Power source : %s", tmp2); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } } @@ -432,7 +432,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Video context driver: %s", tmp_string ? tmp_string : "N/A"); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); { float val = 0.0f; @@ -441,7 +441,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Display metric width (mm): %.2f", val); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (gfx_ctx_get_metrics(DISPLAY_METRIC_MM_HEIGHT, &val)) @@ -449,7 +449,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Display metric height (mm): %.2f", val); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } if (gfx_ctx_get_metrics(DISPLAY_METRIC_DPI, &val)) @@ -457,7 +457,7 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(tmp, sizeof(tmp), "Display metric DPI: %.2f", val); menu_list_push(info->list, tmp, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } } #endif @@ -470,223 +470,223 @@ static int menu_displaylist_parse_system_info(menu_displaylist_info_t *info) snprintf(feat_str, sizeof(feat_str), "LibretroDB support: %s", _libretrodb_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Overlay support: %s", _overlay_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Command interface support: %s", _command_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Network Command interface support: %s", _network_command_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Cocoa support: %s", _cocoa_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "PNG support (RPNG): %s", _rpng_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "SDL1.2 support: %s", _sdl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "SDL2 support: %s", _sdl2_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenGL support: %s", _opengl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenGL ES support: %s", _opengles_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Threading support: %s", _thread_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "KMS/EGL support: %s", _kms_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Udev support: %s", _udev_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenVG support: %s", _vg_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "EGL support: %s", _egl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "X11 support: %s", _x11_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Wayland support: %s", _wayland_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "XVideo support: %s", _xvideo_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "ALSA support: %s", _alsa_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OSS support: %s", _oss_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenAL support: %s", _al_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenSL support: %s", _sl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "RSound support: %s", _rsound_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "RoarAudio support: %s", _roar_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "JACK support: %s", _jack_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "PulseAudio support: %s", _pulse_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "DirectSound support: %s", _dsound_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "XAudio2 support: %s", _xaudio_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Zlib support: %s", _zlib_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "7zip support: %s", _7zip_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Dynamic library support: %s", _dylib_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Cg support: %s", _cg_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "GLSL support: %s", _glsl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "HLSL support: %s", _hlsl_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "libxml2 XML parsing support: %s", _libxml2_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "SDL image support: %s", _sdl_image_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "OpenGL/Direct3D render-to-texture (multi-pass shaders) support: %s", _fbo_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "FFmpeg support: %s", _ffmpeg_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "CoreText support: %s", _coretext_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "FreeType support: %s", _freetype_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Netplay (peer-to-peer) support: %s", _netplay_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Python (script support in shaders) support: %s", _python_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Video4Linux2 support: %s", _v4l2_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); snprintf(feat_str, sizeof(feat_str), "Libusb support: %s", _libusb_supp ? "true" : "false"); menu_list_push(info->list, feat_str, "", - MENU_SETTINGS_CORE_INFO_NONE, 0); + MENU_SETTINGS_CORE_INFO_NONE, 0, 0); } return 0; @@ -707,7 +707,7 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, if (list_size <= 0) { menu_list_push(info->list, "No playlist entries available.", "", - MENU_SETTINGS_CORE_OPTION_NONE, 0); + MENU_SETTINGS_CORE_OPTION_NONE, 0, 0); return 0; } @@ -761,11 +761,11 @@ static int menu_displaylist_parse_playlist(menu_displaylist_info_t *info, strlcat(db_path, ".rdb", sizeof(db_path)); menu_list_push(info->list, label, - db_path, MENU_FILE_RDB_ENTRY, 0); + db_path, MENU_FILE_RDB_ENTRY, 0, 0); } else menu_list_push(info->list, fill_buf, path_playlist, - MENU_FILE_PLAYLIST_ENTRY, i); + MENU_FILE_PLAYLIST_ENTRY, i, 0); } return 0; @@ -786,17 +786,17 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info) return -1; menu_list_push(info->list, "Apply Shader Changes", "shader_apply_changes", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Load Shader Preset", "video_shader_preset", - MENU_FILE_PATH, 0); + MENU_FILE_PATH, 0, 0); menu_list_push(info->list, "Shader Preset Save As", - "video_shader_preset_save_as", MENU_SETTING_ACTION, 0); + "video_shader_preset_save_as", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Parameters (Current)", - "video_shader_parameters", MENU_SETTING_ACTION, 0); + "video_shader_parameters", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Parameters (Menu)", - "video_shader_preset_parameters", MENU_SETTING_ACTION, 0); + "video_shader_preset_parameters", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Shader Passes", "video_shader_num_passes", - 0, 0); + 0, 0, 0); for (i = 0; i < shader->passes; i++) { @@ -804,15 +804,15 @@ static int menu_displaylist_parse_shader_options(menu_displaylist_info_t *info) snprintf(buf, sizeof(buf), "Shader #%u", i); menu_list_push(info->list, buf, "video_shader_pass", - MENU_SETTINGS_SHADER_PASS_0 + i, 0); + MENU_SETTINGS_SHADER_PASS_0 + i, 0, 0); snprintf(buf, sizeof(buf), "Shader #%u Filter", i); menu_list_push(info->list, buf, "video_shader_filter_pass", - MENU_SETTINGS_SHADER_PASS_FILTER_0 + i, 0); + MENU_SETTINGS_SHADER_PASS_FILTER_0 + i, 0, 0); snprintf(buf, sizeof(buf), "Shader #%u Scale", i); menu_list_push(info->list, buf, "video_shader_scale_pass", - MENU_SETTINGS_SHADER_PASS_SCALE_0 + i, 0); + MENU_SETTINGS_SHADER_PASS_SCALE_0 + i, 0, 0); } return 0; @@ -853,7 +853,7 @@ static int create_string_list_rdb_entry_string(const char *desc, const char *lab string_list_join_concat(output_label, str_len, str_list, "|"); snprintf(tmp, sizeof(tmp), "%s: %s", desc, actual_string); - menu_list_push(list, tmp, output_label, 0, 0); + menu_list_push(list, tmp, output_label, 0, 0, 0); if (output_label) free(output_label); @@ -900,7 +900,7 @@ static int create_string_list_rdb_entry_int(const char *desc, const char *label, snprintf(tmp, sizeof(tmp), "%s: %d", desc, actual_int); menu_list_push(list, tmp, output_label, - 0, 0); + 0, 0, 0); if (output_label) free(output_label); @@ -999,7 +999,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) if (((strcmp(playlist->entries[j].core_name, "DETECT")) != 0) && ((strcmp(playlist->entries[j].core_path, "DETECT") != 0))) menu_list_push(info->list, "Start Content", "rdb_entry_start_content", - MENU_FILE_PLAYLIST_ENTRY, 0); + MENU_FILE_PLAYLIST_ENTRY, 0, 0); } } @@ -1007,13 +1007,13 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) { snprintf(tmp, sizeof(tmp), "Name: %s", db_info_entry->name); menu_list_push(info->list, tmp, "rdb_entry_name", - 0, 0); + 0, 0, 0); } if (db_info_entry->description) { snprintf(tmp, sizeof(tmp), "Description: %s", db_info_entry->description); menu_list_push(info->list, tmp, "rdb_entry_description", - 0, 0); + 0, 0, 0); } if (db_info_entry->publisher) { @@ -1139,13 +1139,13 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) (db_info_entry->analog_supported == 1) ? "true" : (db_info_entry->analog_supported == -1) ? "N/A" : "false"); menu_list_push(info->list, tmp, "rdb_entry_analog", - 0, 0); + 0, 0, 0); snprintf(tmp, sizeof(tmp), "Rumble supported: %s", (db_info_entry->rumble_supported == 1) ? "true" : (db_info_entry->rumble_supported == -1) ? "N/A" : "false"); menu_list_push(info->list, tmp, "rdb_entry_rumble", - 0, 0); + 0, 0, 0); if (db_info_entry->crc32) { @@ -1173,7 +1173,7 @@ static int menu_displaylist_parse_database_entry(menu_displaylist_info_t *info) if (db_info->count < 1) menu_list_push(info->list, "No information available.", "", - 0, 0); + 0, 0, 0); content_playlist_free(playlist); @@ -1203,7 +1203,7 @@ static int menu_database_parse_query(file_list_t *list, const char *path, if (db_list->list[i].name && db_list->list[i].name[0] != '\0') { menu_list_push(list, db_list->list[i].name, - path, MENU_FILE_RDB_ENTRY, 0); + path, MENU_FILE_RDB_ENTRY, 0, 0); } } @@ -1224,14 +1224,14 @@ static int deferred_push_video_shader_parameters_common( if (list_size <= 0) { menu_list_push(info->list, - "No shader parameters.", "", 0, 0); + "No shader parameters.", "", 0, 0, 0); return 0; } for (i = 0; i < list_size; i++) { menu_list_push(info->list, shader->parameters[i].desc, - info->label, base_parameter + i, 0); + info->label, base_parameter + i, 0, 0); } return 0; @@ -1266,7 +1266,7 @@ static int menu_displaylist_parse_settings(menu_handle_t *menu, continue; menu_list_push(info->list, setting->short_description, - setting->name, menu_setting_set_flags(setting), 0); + setting->name, menu_setting_set_flags(setting), 0, 0); } return 0; @@ -1321,7 +1321,7 @@ static int menu_displaylist_parse_settings_in_subgroup(menu_displaylist_info_t * for (; info->setting->type != ST_END_SUB_GROUP; info->setting++) menu_list_push(info->list, info->setting->short_description, - info->setting->name, menu_setting_set_flags(info->setting), 0); + info->setting->name, menu_setting_set_flags(info->setting), 0, 0); return 0; } @@ -1412,23 +1412,23 @@ static int menu_displaylist_parse_options(menu_displaylist_info_t *info) global_t *global = global_get_ptr(); menu_list_push(info->list, "Core Options", "core_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); if (global->main_is_init) { if (global->has_set_input_descriptors) menu_list_push(info->list, "Core Input Remapping Options", "core_input_remapping_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Core Cheat Options", "core_cheat_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); if (!global->libretro_dummy && global->system.disk_control.get_num_images) menu_list_push(info->list, "Core Disk Options", "disk_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); } menu_list_push(info->list, "Video Options", "video_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); #ifdef HAVE_SHADER_MANAGER menu_list_push(info->list, "Shader Options", "shader_options", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); #endif return 0; @@ -1444,16 +1444,16 @@ static int menu_displaylist_parse_horizontal_content_actions(menu_displaylist_in if (global->main_is_init && !global->libretro_dummy && !strcmp(menu->deferred_path, global->fullpath)) { - menu_list_push(info->list, "Resume", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0); - menu_list_push(info->list, "Save State", "savestate", MENU_SETTING_ACTION_SAVESTATE, 0); - menu_list_push(info->list, "Load State", "loadstate", MENU_SETTING_ACTION_LOADSTATE, 0); - menu_list_push(info->list, "Core Information", "core_information", MENU_SETTING_ACTION_CORE_INFORMATION, 0); - menu_list_push(info->list, "Options", "options", MENU_SETTING_ACTION_CORE_OPTIONS, 0); - menu_list_push(info->list, "Take Screenshot", "take_screenshot", MENU_SETTING_ACTION_SCREENSHOT, 0); - menu_list_push(info->list, "Reset", "restart_content", MENU_SETTING_ACTION_RESET, 0); + menu_list_push(info->list, "Resume", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0); + menu_list_push(info->list, "Save State", "savestate", MENU_SETTING_ACTION_SAVESTATE, 0, 0); + menu_list_push(info->list, "Load State", "loadstate", MENU_SETTING_ACTION_LOADSTATE, 0, 0); + menu_list_push(info->list, "Core Information", "core_information", MENU_SETTING_ACTION_CORE_INFORMATION, 0, 0); + menu_list_push(info->list, "Options", "options", MENU_SETTING_ACTION_CORE_OPTIONS, 0, 0); + menu_list_push(info->list, "Take Screenshot", "take_screenshot", MENU_SETTING_ACTION_SCREENSHOT, 0, 0); + menu_list_push(info->list, "Reset", "restart_content", MENU_SETTING_ACTION_RESET, 0, 0); } else - menu_list_push(info->list, "Run", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0); + menu_list_push(info->list, "Run", "file_load_or_resume", MENU_SETTING_ACTION_RUN, 0, 0); return 0; } @@ -1474,13 +1474,13 @@ static int menu_displaylist_parse_options_cheats(menu_displaylist_info_t *info) } menu_list_push(info->list, "Cheat File Load", "cheat_file_load", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Cheat File Save As", - "cheat_file_save_as", MENU_SETTING_ACTION, 0); + "cheat_file_save_as", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Cheat Passes", "cheat_num_passes", - 0, 0); + 0, 0, 0); menu_list_push(info->list, "Apply Cheat Changes", "cheat_apply_changes", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); for (i = 0; i < cheat->size; i++) { @@ -1488,7 +1488,7 @@ static int menu_displaylist_parse_options_cheats(menu_displaylist_info_t *info) snprintf(cheat_label, sizeof(cheat_label), "Cheat #%u: ", i); if (cheat->cheats[i].desc) strlcat(cheat_label, cheat->cheats[i].desc, sizeof(cheat_label)); - menu_list_push(info->list, cheat_label, "", MENU_SETTINGS_CHEAT_BEGIN + i, 0); + menu_list_push(info->list, cheat_label, "", MENU_SETTINGS_CHEAT_BEGIN + i, 0, 0); } return 0; @@ -1498,9 +1498,9 @@ static int menu_displaylist_parse_options_management(menu_displaylist_info_t *in { #ifdef HAVE_LIBRETRODB menu_list_push(info->list, "Database Manager", "database_manager_list", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Cursor Manager", "cursor_manager_list", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); #endif return 0; } @@ -1512,13 +1512,13 @@ static int menu_displaylist_parse_options_remappings(menu_displaylist_info_t *in global_t *global = global_get_ptr(); menu_list_push(info->list, "Load Remap File", "remap_file_load", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Save Remap File As", - "remap_file_save_as", MENU_SETTING_ACTION, 0); + "remap_file_save_as", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Save Core Remap File", - "remap_file_save_core", MENU_SETTING_ACTION, 0); + "remap_file_save_core", MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Save Game Remap File", - "remap_file_save_game", MENU_SETTING_ACTION, 0); + "remap_file_save_game", MENU_SETTING_ACTION, 0, 0); for (p = 0; p < settings->input.max_users; p++) { @@ -1540,7 +1540,7 @@ static int menu_displaylist_parse_options_remappings(menu_displaylist_info_t *in "User %u %s : ", user, description); menu_list_push(info->list, desc_label, "", MENU_SETTINGS_INPUT_DESC_BEGIN + - (p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0); + (p * (RARCH_FIRST_CUSTOM_BIND + 4)) + retro_id, 0, 0); } } @@ -1590,7 +1590,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n if (push_dir) menu_list_push(info->list, "", "", - MENU_FILE_USE_DIRECTORY, 0); + MENU_FILE_USE_DIRECTORY, 0 ,0); if (!str_list) { @@ -1598,7 +1598,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n ? "Unable to read compressed file." : "Directory not found."; - menu_list_push(info->list, str, "", 0, 0); + menu_list_push(info->list, str, "", 0, 0, 0); return 0; } @@ -1611,7 +1611,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n if (!(info->flags & SL_FLAG_ALLOW_EMPTY_LIST)) { menu_list_push(info->list, - "No items.", "", 0, 0); + "No items.", "", 0, 0, 0); } string_list_free(str_list); @@ -1691,7 +1691,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n } menu_list_push(info->list, path, label, - file_type, 0); + file_type, 0, 0); } string_list_free(str_list); @@ -1701,7 +1701,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n case MENU_LABEL_CORE_LIST: { const char *dir = NULL; - menu_list_get_last_stack(menu->menu_list, &dir, NULL, NULL); + menu_list_get_last_stack(menu->menu_list, &dir, NULL, NULL, NULL); list_size = file_list_get_size(info->list); for (i = 0; i < list_size; i++) @@ -1710,7 +1710,7 @@ static int menu_displaylist_parse_generic(menu_displaylist_info_t *info, bool *n char core_path[PATH_MAX_LENGTH], display_name[PATH_MAX_LENGTH]; const char *path = NULL; - menu_list_get_at_offset(info->list, i, &path, NULL, &type); + menu_list_get_at_offset(info->list, i, &path, NULL, &type, NULL); if (type != MENU_FILE_CORE) continue; @@ -1747,17 +1747,17 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) case DISPLAYLIST_NONE: break; case DISPLAYLIST_INFO: - menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr); + menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0); break; case DISPLAYLIST_GENERIC: menu_driver_list_cache(MENU_LIST_PLAIN, 0); - menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr); + menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0); menu_navigation_clear(&menu->navigation, true); menu_set_refresh(); break; case DISPLAYLIST_HELP: - menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr); + menu_list_push(info->list, info->path, info->label, info->type, info->directory_ptr, 0); menu->push_start_screen = false; menu_display_fb_set_dirty(); break; @@ -1831,13 +1831,13 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) menu_list_clear(info->list); #if defined(GEKKO) || defined(__CELLOS_LV2__) menu_list_push(info->list, "Screen Resolution", "", - MENU_SETTINGS_VIDEO_RESOLUTION, 0); + MENU_SETTINGS_VIDEO_RESOLUTION, 0, 0); #endif menu_list_push(info->list, "Custom Ratio", "", - MENU_SETTINGS_CUSTOM_VIEWPORT, 0); + MENU_SETTINGS_CUSTOM_VIEWPORT, 0, 0); #ifndef HAVE_FILTERS_BUILTIN menu_list_push(info->list, "Video Filter", "video_filter", - 0, 0); + 0, 0, 0); #endif need_push = true; @@ -1890,9 +1890,9 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) case DISPLAYLIST_PERFCOUNTER_SELECTION: menu_list_clear(info->list); menu_list_push(info->list, "Frontend Counters", "frontend_counters", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); menu_list_push(info->list, "Core Counters", "core_counters", - MENU_SETTING_ACTION, 0); + MENU_SETTING_ACTION, 0, 0); need_refresh = true; need_push = true; @@ -1910,7 +1910,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) { if (setting->type == ST_GROUP) menu_list_push(info->list, setting->short_description, - setting->name, menu_setting_set_flags(setting), 0); + setting->name, menu_setting_set_flags(setting), 0, 0); } } else @@ -1935,7 +1935,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) strlcat(new_path, setting->short_description, sizeof(new_path)); menu_list_push(info->list, new_path, - new_label, MENU_SETTING_SUBGROUP, 0); + new_label, MENU_SETTING_SUBGROUP, 0, 0); } } } @@ -1988,11 +1988,11 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) case DISPLAYLIST_OPTIONS_DISK: menu_list_clear(info->list); menu_list_push(info->list, "Disk Index", "disk_idx", - MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0); + MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_INDEX, 0, 0); menu_list_push(info->list, "Disk Cycle Tray Status", "disk_cycle_tray_status", - MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0); + MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_CYCLE_TRAY_STATUS, 0, 0); menu_list_push(info->list, "Disk Image Append", "disk_image_append", - MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0); + MENU_SETTINGS_CORE_DISK_OPTIONS_DISK_IMAGE_APPEND, 0, 0); need_push = true; break; @@ -2017,7 +2017,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) { menu_list_push(info->list, "No cores available.", "", - 0, 0); + 0, 0, 0); return 0; } @@ -2025,10 +2025,10 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) { if (type == DISPLAYLIST_CORES_COLLECTION_SUPPORTED) menu_list_push(info->list, core_info[i].path, "", - MENU_FILE_CORE, 0); + MENU_FILE_CORE, 0, 0); else menu_list_push(info->list, core_info[i].path, "detect_core_list_ok", - MENU_FILE_CORE, 0); + MENU_FILE_CORE, 0, 0); menu_list_set_alt_at_offset(info->list, i, core_info[i].display_name); } @@ -2048,11 +2048,11 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type) for (i = 0; i < opts; i++) menu_list_push(info->list, core_option_get_desc(global->system.core_options, i), "", - MENU_SETTINGS_CORE_OPTION_START + i, 0); + MENU_SETTINGS_CORE_OPTION_START + i, 0, 0); } else menu_list_push(info->list, "No options available.", "", - MENU_SETTINGS_CORE_OPTION_NONE, 0); + MENU_SETTINGS_CORE_OPTION_NONE, 0, 0); need_push = true; break; case DISPLAYLIST_DEFAULT: @@ -2112,7 +2112,7 @@ int menu_displaylist_push(file_list_t *list, file_list_t *menu_list) menu_displaylist_info_t info = {0}; uint32_t hash_label = 0; - menu_list_get_last_stack(menu->menu_list, &path, &label, &type); + menu_list_get_last_stack(menu->menu_list, &path, &label, &type, NULL); info.list = list; info.menu_list = menu_list; @@ -2166,7 +2166,7 @@ bool menu_displaylist_init(void *data) strlcpy(info.label, "Main Menu", sizeof(info.label)); menu_list_push(menu_list->menu_stack, - info.path, info.label, info.type, info.flags); + info.path, info.label, info.type, info.flags, 0); menu_displaylist_push_list(&info, DISPLAYLIST_MAIN_MENU); menu_navigation_clear(nav, true); diff --git a/menu/menu_entries.c b/menu/menu_entries.c index 8c7199a8c2..63fde07249 100644 --- a/menu/menu_entries.c +++ b/menu/menu_entries.c @@ -65,7 +65,7 @@ void menu_entries_init(void *data, return; menu_list_get_last_stack(menu->menu_list, - NULL, &menu_label, NULL); + NULL, &menu_label, NULL, NULL); if (label) str_list = string_split(label, "|"); diff --git a/menu/menu_entry.c b/menu/menu_entry.c index bd4b1b0ae7..d8cd78198f 100644 --- a/menu/menu_entry.c +++ b/menu/menu_entry.c @@ -70,7 +70,7 @@ int menu_entries_get_title(char *s, size_t len) cbs = (menu_file_list_cbs_t*)menu_list_get_last_stack_actiondata(menu_list); - menu_list_get_last_stack(menu_list, &path, &label, &menu_type); + menu_list_get_last_stack(menu_list, &path, &label, &menu_type, NULL); (void)cbs; @@ -140,10 +140,11 @@ static rarch_setting_t *menu_entry_get_setting(uint32_t i) menu_list_t *menu_list = menu_list_get_ptr(); unsigned menu_type = 0; - menu_list_get_last_stack(menu_list, &dir, &label, &menu_type); + menu_list_get_last_stack(menu_list, &dir, + &label, &menu_type, NULL); menu_list_get_at_offset(menu_list->selection_buf, i, &path, - &entry_label, &type); + &entry_label, &type, NULL); return menu_setting_find( menu_list->selection_buf->list[i].label); @@ -159,10 +160,11 @@ enum menu_entry_type menu_entry_get_type(uint32_t i) menu_list_t *menu_list = menu_list_get_ptr(); unsigned menu_type = 0; - menu_list_get_last_stack(menu_list, &dir, &label, &menu_type); + menu_list_get_last_stack(menu_list, &dir, + &label, &menu_type, NULL); menu_list_get_at_offset(menu_list->selection_buf, i, &path, - &entry_label, &type); + &entry_label, &type, NULL); setting = menu_entry_get_setting(i); @@ -328,7 +330,7 @@ int menu_entry_pathdir_set_value(uint32_t i, const char *s) menu_list_t *menu_list = menu_list_get_ptr(); menu_list_get_last_stack(menu_list, - &menu_path, &menu_label, NULL); + &menu_path, &menu_label, NULL, NULL); setting = menu_setting_find(menu_label); @@ -408,14 +410,15 @@ void menu_entry_get(menu_entry_t *entry, size_t i, if (!menu_list) return; - menu_list_get_last_stack(menu_list, NULL, &label, NULL); + menu_list_get_last_stack(menu_list, NULL, &label, NULL, NULL); list = userdata ? (file_list_t*)userdata : menu_list->selection_buf; if (!list) return; - menu_list_get_at_offset(list, i, &path, &entry_label, &entry->type); + menu_list_get_at_offset(list, i, &path, &entry_label, &entry->type, + NULL); cbs = menu_list_get_actiondata_at_offset(list, i); @@ -492,7 +495,7 @@ int menu_entry_iterate(unsigned action) cbs = (menu_file_list_cbs_t*)menu_list_get_last_stack_actiondata(menu_list); - menu_list_get_last_stack(menu_list, NULL, &label, NULL); + menu_list_get_last_stack(menu_list, NULL, &label, NULL, NULL); if (cbs && cbs->action_iterate) return cbs->action_iterate(label, action); diff --git a/menu/menu_list.c b/menu/menu_list.c index 511105bd00..6f4211ac74 100644 --- a/menu/menu_list.c +++ b/menu/menu_list.c @@ -47,7 +47,7 @@ static INLINE bool menu_list_elem_is_dir(file_list_t *list, const char *label = NULL; unsigned type = 0; - menu_list_get_at_offset(list, offset, &path, &label, &type); + menu_list_get_at_offset(list, offset, &path, &label, &type, NULL); return type != MENU_FILE_PLAIN; } @@ -206,26 +206,27 @@ size_t menu_list_get_stack_size(menu_list_t *list) } void menu_list_get_at_offset(const file_list_t *list, size_t idx, - const char **path, const char **label, unsigned *file_type) + const char **path, const char **label, unsigned *file_type, + size_t *entry_idx) { - file_list_get_at_offset(list, idx, path, label, file_type); + file_list_get_at_offset(list, idx, path, label, file_type, entry_idx); } void menu_list_get_last(const file_list_t *list, const char **path, const char **label, - unsigned *file_type) + unsigned *file_type, size_t *entry_idx) { if (list) - file_list_get_last(list, path, label, file_type); + file_list_get_last(list, path, label, file_type, entry_idx); } void menu_list_get_last_stack(const menu_list_t *list, const char **path, const char **label, - unsigned *file_type) + unsigned *file_type, size_t *entry_idx) { if (list) - file_list_get_last(list->menu_stack, path, label, file_type); + file_list_get_last(list->menu_stack, path, label, file_type, entry_idx); } menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t idx) @@ -254,20 +255,21 @@ static int menu_list_flush_stack_type( void menu_list_flush_stack(menu_list_t *list, const char *needle, unsigned final_type) { - const char *path = NULL; - const char *label = NULL; - unsigned type = 0; + const char *path = NULL; + const char *label = NULL; + unsigned type = 0; + size_t entry_idx = 0; menu_handle_t *menu = menu_driver_get_ptr(); if (!menu || !list) return; menu_set_refresh(); - file_list_get_last(list->menu_stack, &path, &label, &type); + file_list_get_last(list->menu_stack, &path, &label, &type, &entry_idx); while (menu_list_flush_stack_type(needle, label, type, final_type) != 0) { menu_list_pop(list->menu_stack, &menu->navigation.selection_ptr); - file_list_get_last(list->menu_stack, &path, &label, &type); + file_list_get_last(list->menu_stack, &path, &label, &type, &entry_idx); } } @@ -289,21 +291,22 @@ void menu_list_pop_stack(menu_list_t *list) void menu_list_pop_stack_by_needle(menu_list_t *list, const char *needle) { - const char *path = NULL; - const char *label = NULL; - unsigned type = 0; + const char *path = NULL; + const char *label = NULL; + unsigned type = 0; + size_t entry_idx = 0; menu_handle_t *menu = menu_driver_get_ptr(); if (!menu || !list) return; menu_set_refresh(); - file_list_get_last(list->menu_stack, &path, &label, &type); + file_list_get_last(list->menu_stack, &path, &label, &type, &entry_idx); while (strcmp(needle, label) == 0) { menu_list_pop(list->menu_stack, &menu->navigation.selection_ptr); - file_list_get_last(list->menu_stack, &path, &label, &type); + file_list_get_last(list->menu_stack, &path, &label, &type, &entry_idx); } } @@ -340,12 +343,13 @@ end: void menu_list_push(file_list_t *list, const char *path, const char *label, - unsigned type, size_t directory_ptr) + unsigned type, size_t directory_ptr, + size_t entry_idx) { if (!list || !label) return; - file_list_push(list, path, label, type, directory_ptr); + file_list_push(list, path, label, type, directory_ptr, entry_idx); menu_driver_list_insert(list, path, label, type, list->size - 1); } diff --git a/menu/menu_list.h b/menu/menu_list.h index 6563fc01fc..75ad42b74d 100644 --- a/menu/menu_list.h +++ b/menu/menu_list.h @@ -86,7 +86,8 @@ void menu_list_pop_stack_by_needle(menu_list_t *list, const char *needle); void menu_list_get_at_offset(const file_list_t *list, size_t idx, - const char **path, const char **label, unsigned *file_type); + const char **path, const char **label, unsigned *file_type, + size_t *entry_idx); menu_file_list_cbs_t *menu_list_get_actiondata_at_offset(const file_list_t *list, size_t idx); @@ -98,17 +99,18 @@ void *menu_list_get_last_stack_actiondata(const menu_list_t *list); void menu_list_get_last(const file_list_t *list, const char **path, const char **label, - unsigned *file_type); + unsigned *file_type, size_t *entry_idx); void menu_list_get_last_stack(const menu_list_t *list, const char **path, const char **label, - unsigned *file_type); + unsigned *file_type, size_t *entry_idx); void menu_list_clear(file_list_t *list); void menu_list_push(file_list_t *list, const char *path, const char *label, - unsigned type, size_t directory_ptr); + unsigned type, size_t directory_ptr, + size_t entry_idx); void menu_list_get_alt_at_offset(const file_list_t *list, size_t idx, const char **alt);