diff --git a/intl/msg_hash_chs.h b/intl/msg_hash_chs.h index 7f1e783e70..ab985c9fc9 100644 --- a/intl/msg_hash_chs.h +++ b/intl/msg_hash_chs.h @@ -2033,6 +2033,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "接口") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_cht.h b/intl/msg_hash_cht.h index f540971d1c..ff149d7d2d 100644 --- a/intl/msg_hash_cht.h +++ b/intl/msg_hash_cht.h @@ -2033,6 +2033,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "金手指檔案") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "目前檔案") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "接口") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_de.h b/intl/msg_hash_de.h index 6dc87ced72..336e1fafc7 100644 --- a/intl/msg_hash_de.h +++ b/intl/msg_hash_de.h @@ -2033,6 +2033,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat-Dateiname") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Vorlagen-Dateiname") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Netzwerk-Karte") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_eo.h b/intl/msg_hash_eo.h index fc8a5a7ce3..886a596830 100644 --- a/intl/msg_hash_eo.h +++ b/intl/msg_hash_eo.h @@ -1922,6 +1922,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_fr.h b/intl/msg_hash_fr.h index 466a97d753..994d6c2e12 100644 --- a/intl/msg_hash_fr.h +++ b/intl/msg_hash_fr.h @@ -2053,6 +2053,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Nom du fichier de triche") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Nom du fichier de pré-réglage") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_it.h b/intl/msg_hash_it.h index 432b106e6c..76aba8b6f3 100644 --- a/intl/msg_hash_it.h +++ b/intl/msg_hash_it.h @@ -1910,6 +1910,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interfaccia") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_ja.h b/intl/msg_hash_ja.h index 14e0aa3f7e..c7b2b387d5 100644 --- a/intl/msg_hash_ja.h +++ b/intl/msg_hash_ja.h @@ -2079,6 +2079,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "インタフェース") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_ko.h b/intl/msg_hash_ko.h index 966b949c6b..71c5562043 100644 --- a/intl/msg_hash_ko.h +++ b/intl/msg_hash_ko.h @@ -2033,6 +2033,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "치트 파일명") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "프리셋 파일명") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "인터페이스") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_nl.h b/intl/msg_hash_nl.h index 988b806124..9a277c3cdc 100644 --- a/intl/msg_hash_nl.h +++ b/intl/msg_hash_nl.h @@ -1920,6 +1920,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_pt_br.h b/intl/msg_hash_pt_br.h index 548d1848e6..ef7f181046 100644 --- a/intl/msg_hash_pt_br.h +++ b/intl/msg_hash_pt_br.h @@ -2725,6 +2725,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Nome de Arquivo de Predefinição" ) +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface" ) diff --git a/intl/msg_hash_pt_pt.h b/intl/msg_hash_pt_pt.h index 74393a6e63..6d19c56498 100644 --- a/intl/msg_hash_pt_pt.h +++ b/intl/msg_hash_pt_pt.h @@ -2023,6 +2023,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Nome do Arquivo de Trapaça") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Nome de Arquivo Pré-Definido") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_ru.h b/intl/msg_hash_ru.h index ff4d06245f..5b421618b0 100644 --- a/intl/msg_hash_ru.h +++ b/intl/msg_hash_ru.h @@ -2068,6 +2068,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Имя чита") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Имя настроек") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Интерфейс") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 4e005fd2fe..e3853f645b 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -2089,6 +2089,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/intl/msg_hash_vn.h b/intl/msg_hash_vn.h index f770c9a546..d869cc7d99 100644 --- a/intl/msg_hash_vn.h +++ b/intl/msg_hash_vn.h @@ -2051,6 +2051,8 @@ MSG_HASH(MSG_INPUT_CHEAT_FILENAME, "Cheat Filename") MSG_HASH(MSG_INPUT_PRESET_FILENAME, "Preset Filename") +MSG_HASH(MSG_INPUT_RENAME_ENTRY, + "Rename Title") MSG_HASH(MSG_INTERFACE, "Interface") MSG_HASH(MSG_INTERNAL_STORAGE, diff --git a/menu/cbs/menu_cbs_ok.c b/menu/cbs/menu_cbs_ok.c index 87d81c5fc4..a9786fbd57 100644 --- a/menu/cbs/menu_cbs_ok.c +++ b/menu/cbs/menu_cbs_ok.c @@ -1823,6 +1823,37 @@ static int action_ok_cheat(const char *path, return 0; } +static void menu_input_st_string_cb_rename_entry(void *userdata, + const char *str) +{ + if (str && *str) + { + const char *label = menu_input_dialog_get_buffer(); + + if (!string_is_empty(label)) + { + playlist_t *tmp_playlist = NULL; + menu_driver_ctl(RARCH_MENU_CTL_PLAYLIST_GET, &tmp_playlist); + size_t new_selection_ptr = menu_input_dialog_get_kb_idx(); + + if (tmp_playlist) + { + playlist_update(tmp_playlist, + new_selection_ptr, + NULL, + label, + NULL, + NULL, + NULL, + NULL); + playlist_write_file(tmp_playlist); + } + } + } + + menu_input_dialog_end(); +} + static void menu_input_st_string_cb_save_preset(void *userdata, const char *str) { @@ -3019,6 +3050,22 @@ default_action_ok_cmd_func(action_ok_disk_cycle_tray_status, CMD_EVENT_DISK_EJEC default_action_ok_cmd_func(action_ok_shader_apply_changes, CMD_EVENT_SHADERS_APPLY_CHANGES ) default_action_ok_cmd_func(action_ok_add_to_favorites, CMD_EVENT_ADD_TO_FAVORITES) +static int action_ok_rename_entry(const char *path, + const char *label, unsigned type, size_t idx, size_t entry_idx) +{ + menu_input_ctx_line_t line; + + line.label = msg_hash_to_str(MSG_INPUT_RENAME_ENTRY); + line.label_setting = label; + line.type = type; + line.idx = (unsigned)entry_idx; + line.cb = menu_input_st_string_cb_rename_entry; + + if (!menu_input_dialog_start(&line)) + return -1; + return 0; +} + static int action_ok_delete_entry(const char *path, const char *label, unsigned type, size_t idx, size_t entry_idx) { @@ -4141,7 +4188,7 @@ static int menu_cbs_init_bind_ok_compare_label(menu_file_list_cbs_t *cbs, BIND_ACTION_OK(cbs, action_ok_screenshot); break; case MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME: - BIND_ACTION_OK(cbs, action_ok_delete_entry); + BIND_ACTION_OK(cbs, action_ok_rename_entry); break; case MENU_ENUM_LABEL_DELETE_ENTRY: BIND_ACTION_OK(cbs, action_ok_delete_entry); diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 1b4078da03..7d4b8b3ce8 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -3003,12 +3003,10 @@ static int menu_displaylist_parse_horizontal_content_actions( msg_hash_to_str(MENU_ENUM_LABEL_RUN), MENU_ENUM_LABEL_RUN, FILE_TYPE_PLAYLIST_ENTRY, 0, idx); -#if 0 menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_RENAME), msg_hash_to_str(MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME), MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME, FILE_TYPE_PLAYLIST_ENTRY, 0, idx); -#endif if (settings->bools.playlist_entry_remove) menu_entries_append_enum(info->list, diff --git a/msg_hash.h b/msg_hash.h index 38e035fc0f..f491e60462 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -286,6 +286,7 @@ enum msg_hash_enums MSG_INPUT_CHEAT, MSG_INPUT_PRESET_FILENAME, MSG_INPUT_CHEAT_FILENAME, + MSG_INPUT_RENAME_ENTRY, MSG_REMAP_FILE_SAVED_SUCCESSFULLY, MSG_REMAP_FILE_REMOVED_SUCCESSFULLY, MSG_SHADER_PRESET_SAVED_SUCCESSFULLY, diff --git a/playlist.c b/playlist.c index b8907f1a96..a09f83d290 100644 --- a/playlist.c +++ b/playlist.c @@ -291,12 +291,8 @@ bool playlist_push(playlist_t *playlist, static char base_path[255] = {0}; fill_pathname_base_noext(base_path, core_path, sizeof(base_path)); core_name = base_path; - RARCH_LOG("core_name is now: %s\n", core_name); } - RARCH_LOG("core_name: %s.\n", string_is_empty(core_name) ? "N/A" : core_name); - RARCH_LOG("core_path: %s.\n", string_is_empty(core_path) ? "N/A" : core_path); - if (string_is_empty(core_path) || string_is_empty(core_name)) { RARCH_ERR("cannot push NULL or empty core name into the playlist.\n");