mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-27 12:02:05 +00:00
Add toggle to enable / disable playlist name truncation in Ozone
This commit is contained in:
parent
a88b357817
commit
af42417734
@ -332,6 +332,7 @@
|
||||
|
||||
#ifdef HAVE_OZONE
|
||||
#define DEFAULT_OZONE_COLLAPSE_SIDEBAR false
|
||||
#define DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME true
|
||||
#endif
|
||||
|
||||
static bool quick_menu_show_take_screenshot = true;
|
||||
|
@ -1625,6 +1625,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
|
||||
|
||||
#ifdef HAVE_OZONE
|
||||
SETTING_BOOL("ozone_collapse_sidebar", &settings->bools.ozone_collapse_sidebar, true, DEFAULT_OZONE_COLLAPSE_SIDEBAR, false);
|
||||
SETTING_BOOL("ozone_truncate_playlist_name", &settings->bools.ozone_truncate_playlist_name, true, DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME, false);
|
||||
#endif
|
||||
SETTING_BOOL("log_to_file", &settings->bools.log_to_file, true, DEFAULT_LOG_TO_FILE, false);
|
||||
SETTING_OVERRIDE(RARCH_OVERRIDE_SETTING_LOG_TO_FILE);
|
||||
|
@ -338,6 +338,7 @@ typedef struct settings
|
||||
bool vibrate_on_keypress;
|
||||
bool enable_device_vibration;
|
||||
bool ozone_collapse_sidebar;
|
||||
bool ozone_truncate_playlist_name;
|
||||
|
||||
bool log_to_file;
|
||||
bool log_to_file_timestamp;
|
||||
|
@ -699,6 +699,8 @@ MSG_HASH(MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME,
|
||||
"ozone_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR,
|
||||
"ozone_collapse_sidebar")
|
||||
MSG_HASH(MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"ozone_truncate_playlist_name")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME,
|
||||
"materialui_menu_color_theme")
|
||||
MSG_HASH(MENU_ENUM_LABEL_MATERIALUI_MENU_FOOTER_OPACITY,
|
||||
|
@ -8755,6 +8755,14 @@ MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR,
|
||||
"Have the left sidebar always collapsed."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"Truncate Playlist names"
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
"Remove everything before the hyphen and the subsequent space in Playlist names. Changes require a restart to take effect."
|
||||
)
|
||||
MSG_HASH(
|
||||
MENU_ENUM_LABEL_VALUE_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME,
|
||||
"Use preferred system color theme"
|
||||
|
@ -459,6 +459,7 @@ default_sublabel_macro(action_bind_sublabel_menu_xmb_thumbnail_scale_factor,
|
||||
default_sublabel_macro(action_bind_sublabel_menu_color_theme, MENU_ENUM_SUBLABEL_MATERIALUI_MENU_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_menu_color_theme, MENU_ENUM_SUBLABEL_OZONE_MENU_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_collapse_sidebar, MENU_ENUM_SUBLABEL_OZONE_COLLAPSE_SIDEBAR)
|
||||
default_sublabel_macro(action_bind_sublabel_ozone_truncate_playlist_name, MENU_ENUM_SUBLABEL_OZONE_TRUNCATE_PLAYLIST_NAME)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_use_preferred_system_color_theme, MENU_ENUM_SUBLABEL_MENU_USE_PREFERRED_SYSTEM_COLOR_THEME)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_wallpaper_opacity, MENU_ENUM_SUBLABEL_MENU_WALLPAPER_OPACITY)
|
||||
default_sublabel_macro(action_bind_sublabel_menu_framebuffer_opacity, MENU_ENUM_SUBLABEL_MENU_FRAMEBUFFER_OPACITY)
|
||||
@ -1526,6 +1527,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
|
||||
case MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ozone_collapse_sidebar);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_ozone_truncate_playlist_name);
|
||||
break;
|
||||
case MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME:
|
||||
case MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME:
|
||||
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_menu_color_theme);
|
||||
|
@ -686,6 +686,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
and the subsequent space */
|
||||
chr = title_noext;
|
||||
hyphen_found = false;
|
||||
settings_t *settings = config_get_ptr();
|
||||
|
||||
while (true)
|
||||
{
|
||||
@ -701,7 +702,7 @@ void ozone_context_reset_horizontal_list(ozone_handle_t *ozone)
|
||||
chr++;
|
||||
}
|
||||
|
||||
if (hyphen_found)
|
||||
if (hyphen_found && settings->bools.ozone_truncate_playlist_name)
|
||||
chr += 2;
|
||||
else
|
||||
chr = title_noext;
|
||||
|
@ -5059,6 +5059,7 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
|
||||
{MENU_ENUM_LABEL_XMB_MENU_COLOR_THEME, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_OZONE_MENU_COLOR_THEME, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_OZONE_COLLAPSE_SIDEBAR, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_ICONS_ENABLE, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_COLOR_THEME, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_MATERIALUI_MENU_HEADER_OPACITY, PARSE_ONLY_FLOAT},
|
||||
@ -6693,6 +6694,7 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
|
||||
{MENU_ENUM_LABEL_PLAYLIST_SUBLABEL_RUNTIME_TYPE, PARSE_ONLY_UINT},
|
||||
{MENU_ENUM_LABEL_PLAYLIST_FUZZY_ARCHIVE_MATCH, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_SCAN_WITHOUT_CORE_MATCH, PARSE_ONLY_BOOL},
|
||||
{MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME, PARSE_ONLY_BOOL},
|
||||
};
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(build_list); i++)
|
||||
|
@ -13472,6 +13472,26 @@ static bool setting_append_list(
|
||||
SD_FLAG_NONE
|
||||
);
|
||||
|
||||
#ifdef HAVE_OZONE
|
||||
if (string_is_equal(settings->arrays.menu_driver, "ozone"))
|
||||
{
|
||||
CONFIG_BOOL(
|
||||
list, list_info,
|
||||
&settings->bools.ozone_truncate_playlist_name,
|
||||
MENU_ENUM_LABEL_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
MENU_ENUM_LABEL_VALUE_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
DEFAULT_OZONE_TRUNCATE_PLAYLIST_NAME,
|
||||
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);
|
||||
}
|
||||
#endif
|
||||
|
||||
END_SUB_GROUP(list, list_info, parent_group);
|
||||
|
||||
END_GROUP(list, list_info, parent_group);
|
||||
|
@ -957,6 +957,7 @@ enum msg_hash_enums
|
||||
MENU_LABEL(XMB_MENU_COLOR_THEME),
|
||||
MENU_LABEL(OZONE_MENU_COLOR_THEME),
|
||||
MENU_LABEL(OZONE_COLLAPSE_SIDEBAR),
|
||||
MENU_LABEL(OZONE_TRUNCATE_PLAYLIST_NAME),
|
||||
MENU_LABEL(MATERIALUI_MENU_COLOR_THEME),
|
||||
MENU_LABEL(QUICK_MENU_OVERRIDE_OPTIONS),
|
||||
MENU_LABEL(QUICK_MENU_SHOW_TAKE_SCREENSHOT),
|
||||
|
Loading…
x
Reference in New Issue
Block a user