mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 18:20:27 +00:00
cherry-pick menu code for core association reset
This commit is contained in:
parent
1354526345
commit
e373d82a58
@ -923,6 +923,8 @@ MSG_HASH(MENU_ENUM_LABEL_ADD_TO_FAVORITES,
|
||||
"favorites_add")
|
||||
MSG_HASH(MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST,
|
||||
"favorites_add_playlist")
|
||||
MSG_HASH(MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION,
|
||||
"reset_core_association")
|
||||
MSG_HASH(MENU_ENUM_LABEL_RUN,
|
||||
"collection")
|
||||
MSG_HASH(MENU_ENUM_LABEL_RUN_MUSIC,
|
||||
|
@ -1373,6 +1373,8 @@ MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES,
|
||||
"Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_ADD_TO_FAVORITES_PLAYLIST,
|
||||
"Add to Favorites")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION,
|
||||
"Reset Core Association")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN,
|
||||
"Run")
|
||||
MSG_HASH(MENU_ENUM_LABEL_VALUE_RUN_MUSIC,
|
||||
|
@ -2871,9 +2871,9 @@ static int action_ok_reset_core_association(const char *path,
|
||||
|
||||
if (!command_event(CMD_EVENT_RESET_CORE_ASSOCIATION, (void *)rpl_entry_selection_ptr))
|
||||
return menu_cbs_exit();
|
||||
return 0;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int action_ok_add_to_favorites(const char *path,
|
||||
const char *label, unsigned type, size_t idx, size_t entry_idx)
|
||||
{
|
||||
@ -2896,12 +2896,11 @@ static int action_ok_add_to_favorites_playlist(const char *path,
|
||||
|
||||
playlist_get_index(tmp_playlist,
|
||||
rpl_entry_selection_ptr, &tmp_path, NULL, NULL, NULL, NULL, NULL);
|
||||
/*
|
||||
|
||||
if (!command_event(CMD_EVENT_ADD_TO_FAVORITES, (void*)tmp_path))
|
||||
return menu_cbs_exit();
|
||||
return 0;
|
||||
*/
|
||||
return action_ok_reset_core_association(path, label, type, idx, entry_idx);
|
||||
|
||||
}
|
||||
|
||||
static int action_ok_delete_entry(const char *path,
|
||||
@ -3965,6 +3964,9 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST:
|
||||
BIND_ACTION_OK(cbs, action_ok_add_to_favorites_playlist);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION:
|
||||
BIND_ACTION_OK(cbs, action_ok_reset_core_association);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES:
|
||||
BIND_ACTION_OK(cbs, action_ok_add_to_favorites);
|
||||
break;
|
||||
|
@ -2186,6 +2186,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES:
|
||||
case MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST:
|
||||
return xmb->textures.list[XMB_TEXTURE_ADD_FAVORITE];
|
||||
case MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION:
|
||||
return xmb->textures.list[XMB_TEXTURE_RENAME];
|
||||
case MENU_ENUM_LABEL_CORE_INPUT_REMAPPING_OPTIONS:
|
||||
return xmb->textures.list[XMB_TEXTURE_INPUT_REMAPPING_OPTIONS];
|
||||
case MENU_ENUM_LABEL_CORE_CHEAT_OPTIONS:
|
||||
|
@ -2812,6 +2812,15 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST),
|
||||
MENU_ENUM_LABEL_ADD_TO_FAVORITES_PLAYLIST, FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
|
||||
}
|
||||
|
||||
if (settings->bools.quick_menu_show_add_to_favorites)
|
||||
{
|
||||
menu_entries_append_enum(info->list,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RESET_CORE_ASSOCIATION),
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION),
|
||||
MENU_ENUM_LABEL_RESET_CORE_ASSOCIATION, FILE_TYPE_PLAYLIST_ENTRY, 0, 0);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (!string_is_empty(db_name) && (!content_loaded ||
|
||||
|
@ -831,6 +831,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(GOTO_VIDEO),
|
||||
MENU_LABEL(ADD_TO_FAVORITES),
|
||||
MENU_LABEL(ADD_TO_FAVORITES_PLAYLIST),
|
||||
MENU_LABEL(RESET_CORE_ASSOCIATION),
|
||||
MENU_LABEL(MENU_THROTTLE_FRAMERATE),
|
||||
MENU_LABEL(NO_ACHIEVEMENTS_TO_DISPLAY),
|
||||
MENU_LABEL(NO_ENTRIES_TO_DISPLAY),
|
||||
|
Loading…
Reference in New Issue
Block a user