mirror of
https://github.com/libretro/RetroArch
synced 2025-04-18 14:42:30 +00:00
Add option to show 'remove playlist entry' only on history/favourites
This commit is contained in:
parent
1120a7e490
commit
80c9475fa4
@ -78,7 +78,6 @@ static const int crt_switch_resolution_super = 2560;
|
|||||||
static const int crt_switch_center_adjust = 0;
|
static const int crt_switch_center_adjust = 0;
|
||||||
|
|
||||||
static const bool def_history_list_enable = true;
|
static const bool def_history_list_enable = true;
|
||||||
static const bool def_playlist_entry_remove = true;
|
|
||||||
static const bool def_playlist_entry_rename = true;
|
static const bool def_playlist_entry_rename = true;
|
||||||
|
|
||||||
static const unsigned int def_user_language = 0;
|
static const unsigned int def_user_language = 0;
|
||||||
@ -747,6 +746,8 @@ static const unsigned playlist_show_inline_core_name = PLAYLIST_INLINE_CORE_DISP
|
|||||||
|
|
||||||
/* Specifies which runtime record to use on playlist sublabels */
|
/* Specifies which runtime record to use on playlist sublabels */
|
||||||
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
static const unsigned playlist_sublabel_runtime_type = PLAYLIST_RUNTIME_PER_CORE;
|
||||||
|
|
||||||
|
static const unsigned playlist_entry_remove_enable = PLAYLIST_ENTRY_REMOVE_ENABLE_ALL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static const bool scan_without_core_match = false;
|
static const bool scan_without_core_match = false;
|
||||||
|
@ -1590,7 +1590,6 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
|||||||
SETTING_BOOL("savestate_auto_load", &settings->bools.savestate_auto_load, true, savestate_auto_load, false);
|
SETTING_BOOL("savestate_auto_load", &settings->bools.savestate_auto_load, true, savestate_auto_load, false);
|
||||||
SETTING_BOOL("savestate_thumbnail_enable", &settings->bools.savestate_thumbnail_enable, true, savestate_thumbnail_enable, false);
|
SETTING_BOOL("savestate_thumbnail_enable", &settings->bools.savestate_thumbnail_enable, true, savestate_thumbnail_enable, false);
|
||||||
SETTING_BOOL("history_list_enable", &settings->bools.history_list_enable, true, def_history_list_enable, false);
|
SETTING_BOOL("history_list_enable", &settings->bools.history_list_enable, true, def_history_list_enable, false);
|
||||||
SETTING_BOOL("playlist_entry_remove", &settings->bools.playlist_entry_remove, true, def_playlist_entry_remove, false);
|
|
||||||
SETTING_BOOL("playlist_entry_rename", &settings->bools.playlist_entry_rename, true, def_playlist_entry_rename, false);
|
SETTING_BOOL("playlist_entry_rename", &settings->bools.playlist_entry_rename, true, def_playlist_entry_rename, false);
|
||||||
SETTING_BOOL("game_specific_options", &settings->bools.game_specific_options, true, default_game_specific_options, false);
|
SETTING_BOOL("game_specific_options", &settings->bools.game_specific_options, true, default_game_specific_options, false);
|
||||||
SETTING_BOOL("auto_overrides_enable", &settings->bools.auto_overrides_enable, true, default_auto_overrides_enable, false);
|
SETTING_BOOL("auto_overrides_enable", &settings->bools.auto_overrides_enable, true, default_auto_overrides_enable, false);
|
||||||
@ -1837,6 +1836,7 @@ static struct config_uint_setting *populate_settings_uint(settings_t *settings,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_MENU
|
#ifdef HAVE_MENU
|
||||||
|
SETTING_UINT("playlist_entry_remove_enable", &settings->uints.playlist_entry_remove_enable, true, playlist_entry_remove_enable, false);
|
||||||
SETTING_UINT("playlist_show_inline_core_name", &settings->uints.playlist_show_inline_core_name, true, playlist_show_inline_core_name, false);
|
SETTING_UINT("playlist_show_inline_core_name", &settings->uints.playlist_show_inline_core_name, true, playlist_show_inline_core_name, false);
|
||||||
SETTING_UINT("playlist_sublabel_runtime_type", &settings->uints.playlist_sublabel_runtime_type, true, playlist_sublabel_runtime_type, false);
|
SETTING_UINT("playlist_sublabel_runtime_type", &settings->uints.playlist_sublabel_runtime_type, true, playlist_sublabel_runtime_type, false);
|
||||||
#endif
|
#endif
|
||||||
|
@ -276,7 +276,6 @@ typedef struct settings
|
|||||||
bool set_supports_no_game_enable;
|
bool set_supports_no_game_enable;
|
||||||
bool auto_screenshot_filename;
|
bool auto_screenshot_filename;
|
||||||
bool history_list_enable;
|
bool history_list_enable;
|
||||||
bool playlist_entry_remove;
|
|
||||||
bool playlist_entry_rename;
|
bool playlist_entry_rename;
|
||||||
bool rewind_enable;
|
bool rewind_enable;
|
||||||
bool vrr_runloop_enable;
|
bool vrr_runloop_enable;
|
||||||
@ -478,6 +477,7 @@ typedef struct settings
|
|||||||
unsigned menu_rgui_particle_effect;
|
unsigned menu_rgui_particle_effect;
|
||||||
unsigned menu_ticker_type;
|
unsigned menu_ticker_type;
|
||||||
|
|
||||||
|
unsigned playlist_entry_remove_enable;
|
||||||
unsigned playlist_show_inline_core_name;
|
unsigned playlist_show_inline_core_name;
|
||||||
unsigned playlist_sublabel_runtime_type;
|
unsigned playlist_sublabel_runtime_type;
|
||||||
|
|
||||||
|
@ -910,9 +910,11 @@ static uint32_t gfx_ctx_drm_get_flags(void *data)
|
|||||||
BIT32_SET(flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
BIT32_SET(flags, GFX_CTX_FLAGS_GL_CORE_CONTEXT);
|
||||||
|
|
||||||
if (string_is_equal(video_driver_get_ident(), "glcore"))
|
if (string_is_equal(video_driver_get_ident(), "glcore"))
|
||||||
|
{
|
||||||
#ifdef HAVE_SLANG
|
#ifdef HAVE_SLANG
|
||||||
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG);
|
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_SLANG);
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
else
|
else
|
||||||
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL);
|
BIT32_SET(flags, GFX_CTX_FLAGS_SHADERS_GLSL);
|
||||||
|
|
||||||
|
@ -202,7 +202,7 @@ MSG_HASH(MENU_ENUM_LABEL_CONTENT_DATABASE_DIRECTORY,
|
|||||||
MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE,
|
MSG_HASH(MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE,
|
||||||
"content_history_size")
|
"content_history_size")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE,
|
MSG_HASH(MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE,
|
||||||
"playlist_entry_remove")
|
"playlist_entry_remove_enable")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
MSG_HASH(MENU_ENUM_LABEL_CONTENT_SETTINGS,
|
||||||
"quick_menu")
|
"quick_menu")
|
||||||
MSG_HASH(MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY,
|
MSG_HASH(MENU_ENUM_LABEL_CORE_ASSETS_DIRECTORY,
|
||||||
|
@ -8627,6 +8627,18 @@ MSG_HASH(
|
|||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER,
|
||||||
"Never"
|
"Never"
|
||||||
)
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV,
|
||||||
|
"History & Favorites"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_ALL,
|
||||||
|
"All Playlists"
|
||||||
|
)
|
||||||
|
MSG_HASH(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_NONE,
|
||||||
|
"OFF"
|
||||||
|
)
|
||||||
MSG_HASH(
|
MSG_HASH(
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SORT_ALPHABETICAL,
|
||||||
"Sort playlists alphabetically"
|
"Sort playlists alphabetically"
|
||||||
|
@ -349,6 +349,14 @@ enum playlist_inline_core_display_type
|
|||||||
PLAYLIST_INLINE_CORE_DISPLAY_LAST
|
PLAYLIST_INLINE_CORE_DISPLAY_LAST
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum playlist_entry_remove_enable_type
|
||||||
|
{
|
||||||
|
PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV = 0,
|
||||||
|
PLAYLIST_ENTRY_REMOVE_ENABLE_ALL,
|
||||||
|
PLAYLIST_ENTRY_REMOVE_ENABLE_NONE,
|
||||||
|
PLAYLIST_ENTRY_REMOVE_ENABLE_LAST
|
||||||
|
};
|
||||||
|
|
||||||
typedef uintptr_t menu_texture_item;
|
typedef uintptr_t menu_texture_item;
|
||||||
|
|
||||||
typedef struct menu_display_ctx_clearcolor
|
typedef struct menu_display_ctx_clearcolor
|
||||||
|
@ -2042,13 +2042,34 @@ static int menu_displaylist_parse_horizontal_content_actions(
|
|||||||
MENU_ENUM_LABEL_RENAME_ENTRY,
|
MENU_ENUM_LABEL_RENAME_ENTRY,
|
||||||
FILE_TYPE_PLAYLIST_ENTRY, 0, idx);
|
FILE_TYPE_PLAYLIST_ENTRY, 0, idx);
|
||||||
|
|
||||||
if (settings->bools.playlist_entry_remove &&
|
if (!settings->bools.kiosk_mode_enable)
|
||||||
!settings->bools.kiosk_mode_enable)
|
{
|
||||||
menu_entries_append_enum(info->list,
|
bool remove_entry_enabled = false;
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DELETE_ENTRY),
|
|
||||||
msg_hash_to_str(MENU_ENUM_LABEL_DELETE_ENTRY),
|
if (settings->uints.playlist_entry_remove_enable == PLAYLIST_ENTRY_REMOVE_ENABLE_ALL)
|
||||||
MENU_ENUM_LABEL_DELETE_ENTRY,
|
remove_entry_enabled = true;
|
||||||
MENU_SETTING_ACTION_DELETE_ENTRY, 0, 0);
|
else if (settings->uints.playlist_entry_remove_enable == PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV)
|
||||||
|
{
|
||||||
|
char system[PATH_MAX_LENGTH];
|
||||||
|
system[0] = '\0';
|
||||||
|
|
||||||
|
menu_driver_get_thumbnail_system(system, sizeof(system));
|
||||||
|
|
||||||
|
if (!string_is_empty(system))
|
||||||
|
remove_entry_enabled = string_is_equal(system, "history") ||
|
||||||
|
string_is_equal(system, "favorites") ||
|
||||||
|
string_is_equal(system, "images_history") ||
|
||||||
|
string_is_equal(system, "music_history") ||
|
||||||
|
string_is_equal(system, "video_history");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (remove_entry_enabled)
|
||||||
|
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,
|
||||||
|
MENU_SETTING_ACTION_DELETE_ENTRY, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
if (settings->bools.quick_menu_show_add_to_favorites)
|
if (settings->bools.quick_menu_show_add_to_favorites)
|
||||||
{
|
{
|
||||||
@ -5628,7 +5649,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
|||||||
{MENU_ENUM_LABEL_HISTORY_LIST_ENABLE, PARSE_ONLY_BOOL},
|
{MENU_ENUM_LABEL_HISTORY_LIST_ENABLE, PARSE_ONLY_BOOL},
|
||||||
{MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT},
|
{MENU_ENUM_LABEL_CONTENT_HISTORY_SIZE, PARSE_ONLY_UINT},
|
||||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME, PARSE_ONLY_BOOL},
|
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_RENAME, PARSE_ONLY_BOOL},
|
||||||
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, PARSE_ONLY_BOOL},
|
{MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE, PARSE_ONLY_UINT},
|
||||||
{MENU_ENUM_LABEL_PLAYLIST_SORT_ALPHABETICAL, PARSE_ONLY_BOOL},
|
{MENU_ENUM_LABEL_PLAYLIST_SORT_ALPHABETICAL, PARSE_ONLY_BOOL},
|
||||||
{MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, PARSE_ONLY_BOOL},
|
{MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT, PARSE_ONLY_BOOL},
|
||||||
{MENU_ENUM_LABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, PARSE_ONLY_UINT},
|
{MENU_ENUM_LABEL_PLAYLIST_SHOW_INLINE_CORE_NAME, PARSE_ONLY_UINT},
|
||||||
|
@ -3862,6 +3862,36 @@ static void setting_get_string_representation_uint_playlist_inline_core_display_
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void setting_get_string_representation_uint_playlist_entry_remove_enable(
|
||||||
|
rarch_setting_t *setting,
|
||||||
|
char *s, size_t len)
|
||||||
|
{
|
||||||
|
if (!setting)
|
||||||
|
return;
|
||||||
|
|
||||||
|
switch (*setting->value.target.unsigned_integer)
|
||||||
|
{
|
||||||
|
case PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV:
|
||||||
|
strlcpy(s,
|
||||||
|
msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV),
|
||||||
|
len);
|
||||||
|
break;
|
||||||
|
case PLAYLIST_ENTRY_REMOVE_ENABLE_ALL:
|
||||||
|
strlcpy(s,
|
||||||
|
msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_ALL),
|
||||||
|
len);
|
||||||
|
break;
|
||||||
|
case PLAYLIST_ENTRY_REMOVE_ENABLE_NONE:
|
||||||
|
strlcpy(s,
|
||||||
|
msg_hash_to_str(
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_NONE),
|
||||||
|
len);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#if defined(_3DS)
|
#if defined(_3DS)
|
||||||
static void setting_get_string_representation_uint_video_3ds_display_mode(
|
static void setting_get_string_representation_uint_video_3ds_display_mode(
|
||||||
rarch_setting_t *setting,
|
rarch_setting_t *setting,
|
||||||
@ -13016,20 +13046,21 @@ static bool setting_append_list(
|
|||||||
general_read_handler,
|
general_read_handler,
|
||||||
SD_FLAG_NONE);
|
SD_FLAG_NONE);
|
||||||
|
|
||||||
CONFIG_BOOL(
|
CONFIG_UINT(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
&settings->bools.playlist_entry_remove,
|
&settings->uints.playlist_entry_remove_enable,
|
||||||
MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE,
|
MENU_ENUM_LABEL_PLAYLIST_ENTRY_REMOVE,
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE,
|
||||||
def_playlist_entry_remove,
|
playlist_entry_remove_enable,
|
||||||
MENU_ENUM_LABEL_VALUE_OFF,
|
|
||||||
MENU_ENUM_LABEL_VALUE_ON,
|
|
||||||
&group_info,
|
&group_info,
|
||||||
&subgroup_info,
|
&subgroup_info,
|
||||||
parent_group,
|
parent_group,
|
||||||
general_write_handler,
|
general_write_handler,
|
||||||
general_read_handler,
|
general_read_handler);
|
||||||
SD_FLAG_NONE);
|
(*list)[list_info->index - 1].action_ok = &setting_action_ok_uint;
|
||||||
|
(*list)[list_info->index - 1].get_string_representation =
|
||||||
|
&setting_get_string_representation_uint_playlist_entry_remove_enable;
|
||||||
|
menu_settings_list_current_add_range(list, list_info, 0, PLAYLIST_ENTRY_REMOVE_ENABLE_LAST-1, 1, true, true);
|
||||||
|
|
||||||
CONFIG_BOOL(
|
CONFIG_BOOL(
|
||||||
list, list_info,
|
list, list_info,
|
||||||
|
@ -2376,6 +2376,10 @@ enum msg_hash_enums
|
|||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_ALWAYS,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_ALWAYS,
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_NEVER,
|
||||||
|
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_HIST_FAV,
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_ALL,
|
||||||
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_ENTRY_REMOVE_ENABLE_NONE,
|
||||||
|
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_CORE,
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_RUNTIME,
|
||||||
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED,
|
MENU_ENUM_LABEL_VALUE_PLAYLIST_SUBLABEL_LAST_PLAYED,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user