diff --git a/config.def.h b/config.def.h index e1b2da81fa..dad381ca23 100644 --- a/config.def.h +++ b/config.def.h @@ -416,6 +416,7 @@ static bool bundle_assets_extract_enable = false; #endif static const bool def_history_list_enable = true; +static const bool def_playlist_entry_remove = true; static const unsigned int def_user_language = 0; diff --git a/configuration.c b/configuration.c index 4b29f161b4..00edc333da 100644 --- a/configuration.c +++ b/configuration.c @@ -836,6 +836,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings, SETTING_BOOL("savestate_auto_load", &settings->savestate_auto_load, true, savestate_auto_load, false); SETTING_BOOL("savestate_thumbnail_enable", &settings->savestate_thumbnail_enable, true, savestate_thumbnail_enable, false); SETTING_BOOL("history_list_enable", &settings->history_list_enable, true, def_history_list_enable, false); + SETTING_BOOL("playlist_entry_remove", &settings->playlist_entry_remove, true, def_playlist_entry_remove, false); SETTING_BOOL("game_specific_options", &settings->game_specific_options, true, default_game_specific_options, false); SETTING_BOOL("auto_overrides_enable", &settings->auto_overrides_enable, true, default_auto_overrides_enable, false); SETTING_BOOL("auto_remaps_enable", &settings->auto_remaps_enable, true, default_auto_remaps_enable, false); diff --git a/configuration.h b/configuration.h index 2f495d78f8..24c83373b7 100644 --- a/configuration.h +++ b/configuration.h @@ -421,6 +421,7 @@ typedef struct settings bool auto_screenshot_filename; bool history_list_enable; + bool playlist_entry_remove; bool rewind_enable; size_t rewind_buffer_size; unsigned rewind_granularity; diff --git a/intl/msg_hash_lbl.h b/intl/msg_hash_lbl.h index e470f94b05..62e9989d1a 100644 --- a/intl/msg_hash_lbl.h +++ b/intl/msg_hash_lbl.h @@ -165,6 +165,8 @@ MSG_HASH(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY, "content_database_path") MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, "content_history_size") +MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, + "playlist_entry_remove") MSG_HASH(MENU_ENUM_LABEL_CONTENT_SETTINGS, "quick_menu") MSG_HASH(MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY, diff --git a/intl/msg_hash_us.h b/intl/msg_hash_us.h index 8ef2193a2a..0e15f1c2eb 100644 --- a/intl/msg_hash_us.h +++ b/intl/msg_hash_us.h @@ -478,6 +478,8 @@ MSG_HASH( MSG_HASH( MENU_ENUM_LABEL_VALUE_CONTENT_HISTORY_SIZE, "History List Size") +MSG_HASH(MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, + "Allow to remove entries") MSG_HASH(MENU_ENUM_LABEL_VALUE_CONTENT_SETTINGS, "Quick Menu") MSG_HASH(MENU_ENUM_LABEL_VALUE_CORE_ASSETS_DIR, diff --git a/menu/menu_displaylist.c b/menu/menu_displaylist.c index 93546f0ca2..2e6baacb4a 100644 --- a/menu/menu_displaylist.c +++ b/menu/menu_displaylist.c @@ -2788,7 +2788,9 @@ static int menu_displaylist_parse_horizontal_content_actions( msg_hash_to_str(MENU_ENUM_LABEL_VALUE_RUN), msg_hash_to_str(MENU_ENUM_LABEL_RUN), MENU_ENUM_LABEL_RUN, FILE_TYPE_PLAYLIST_ENTRY, 0, idx); - menu_entries_append_enum(info->list, + + if (settings->playlist_entry_remove) + menu_entries_append_enum(info->list, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY), msg_hash_to_str(MENU_ENUM_LABEL_DELETE_ENTRY), MENU_ENUM_LABEL_DELETE_ENTRY, @@ -4288,6 +4290,9 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type, void *data) ret = menu_displaylist_parse_settings_enum(menu, info, MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT, false); + ret = menu_displaylist_parse_settings_enum(menu, info, + MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, + PARSE_ONLY_BOOL, false); menu_displaylist_parse_playlist_associations(info); info->need_push = true; diff --git a/menu/menu_setting.c b/menu/menu_setting.c index 090a54fc94..bb888b4c79 100644 --- a/menu/menu_setting.c +++ b/menu/menu_setting.c @@ -5440,6 +5440,26 @@ static bool setting_append_list( menu_settings_list_current_add_range(list, list_info, 0, 0, 1.0, true, false); END_SUB_GROUP(list, list_info, parent_group); + + START_SUB_GROUP(list, list_info, "Playlist", &group_info, &subgroup_info, parent_group); + + CONFIG_BOOL( + list, list_info, + &settings->playlist_entry_remove, + MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, + MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE, + def_playlist_entry_remove, + MENU_ENUM_LABEL_VALUE_OFF, + MENU_ENUM_LABEL_VALUE_ON, + &group_info, + &subgroup_info, + parent_group, + general_write_handler, + general_read_handler, + SD_FLAG_NONE); + + END_SUB_GROUP(list, list_info, parent_group); + END_GROUP(list, list_info, parent_group); break; case SETTINGS_LIST_CHEEVOS: diff --git a/msg_hash.h b/msg_hash.h index f00f2df260..4f9e4d37c6 100644 --- a/msg_hash.h +++ b/msg_hash.h @@ -704,6 +704,7 @@ enum msg_hash_enums /* Playlists */ MENU_LABEL(HISTORY_LIST_ENABLE), MENU_LABEL(CONTENT_HISTORY_SIZE), + MENU_LABEL(PLAYLIST_ENTRY_REMOVE), MENU_LABEL(MENU_THROTTLE_FRAMERATE), MENU_LABEL(NO_ACHIEVEMENTS_TO_DISPLAY), MENU_LABEL(NO_ENTRIES_TO_DISPLAY),