static int action_iterate_info(const char *label, unsigned action) { char msg[PATH_MAX_LENGTH]; char needle[PATH_MAX_LENGTH]; unsigned info_type = 0; rarch_setting_t *current_setting = NULL; file_list_t *list = NULL; menu_handle_t *menu = menu_driver_get_ptr(); if (!menu) return 0; list = (file_list_t*)menu->menu_list->selection_buf; menu_driver_render(); current_setting = (rarch_setting_t*)setting_find_setting( menu->list_settings, list->list[menu->navigation.selection_ptr].label); if (current_setting) strlcpy(needle, current_setting->name, sizeof(needle)); else if ((current_setting = (rarch_setting_t*)setting_find_setting( menu->list_settings, list->list[menu->navigation.selection_ptr].label))) { if (current_setting) strlcpy(needle, current_setting->name, sizeof(needle)); } else { const char *lbl = NULL; menu_list_get_at_offset(list, menu->navigation.selection_ptr, NULL, &lbl, &info_type); if (lbl) strlcpy(needle, lbl, sizeof(needle)); } setting_get_description(needle, msg, sizeof(msg)); menu_driver_render_messagebox(msg); if (action == MENU_ACTION_OK) menu_list_pop(menu->menu_list->menu_stack, &menu->navigation.selection_ptr); return 0; }
static int action_iterate_info(char *s, size_t len, const char *label) { int ret = 0; char needle[PATH_MAX_LENGTH] = {0}; unsigned info_type = 0; rarch_setting_t *current_setting = NULL; file_list_t *list = NULL; menu_list_t *menu_list = menu_list_get_ptr(); size_t selection = menu_navigation_get_current_selection(); if (!menu_list) return 0; list = (file_list_t*)menu_list->selection_buf; menu_driver_render(); current_setting = menu_setting_find(list->list[selection].label); if (current_setting) strlcpy(needle, current_setting->name, sizeof(needle)); else if ((current_setting = menu_setting_find(list->list[selection].label))) { if (current_setting) strlcpy(needle, current_setting->name, sizeof(needle)); } else { const char *lbl = NULL; menu_list_get_at_offset(list, selection, NULL, &lbl, &info_type, NULL); if (lbl) strlcpy(needle, lbl, sizeof(needle)); } setting_get_description(needle, s, len); return ret; }