Skip to content

Commit

Permalink
Add menu support.
Browse files Browse the repository at this point in the history
  • Loading branch information
zoltanvb committed Jul 23, 2024
1 parent e2d810a commit 06eb5c6
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 1 deletion.
10 changes: 9 additions & 1 deletion intl/msg_hash_us.h
Original file line number Diff line number Diff line change
Expand Up @@ -7945,7 +7945,15 @@ MSG_HASH(
MENU_ENUM_SUBLABEL_PLAYLIST_USE_FILENAME,
"When enabled, will find thumbnails by the entry's filename, rather than its label."
)
MSG_HASH(
MSG_HASH(
MENU_ENUM_LABEL_VALUE_PLAYLIST_ALLOW_NON_PNG,
"Allow All Supported Image Types for Thumbnails"
)
MSG_HASH(
MENU_ENUM_SUBLABEL_PLAYLIST_ALLOW_NON_PNG,
"When enabled, local thumbnails can be added in all image types supported by RetroArch (such as jpeg). May have a minor performance impact."
)
MSG_HASH(
MENU_ENUM_LABEL_VALUE_MANAGE,
"Manage"
)
Expand Down
4 changes: 4 additions & 0 deletions menu/cbs/menu_cbs_sublabel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1362,6 +1362,7 @@ DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlist_use_old_format,
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlist_compression, MENU_ENUM_SUBLABEL_PLAYLIST_COMPRESSION)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlist_portable_paths, MENU_ENUM_SUBLABEL_PLAYLIST_PORTABLE_PATHS)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlist_use_filename, MENU_ENUM_SUBLABEL_PLAYLIST_USE_FILENAME)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_playlist_allow_non_png, MENU_ENUM_SUBLABEL_PLAYLIST_ALLOW_NON_PNG)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_rgui_full_width_layout, MENU_ENUM_SUBLABEL_MENU_RGUI_FULL_WIDTH_LAYOUT)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_rgui_extended_ascii, MENU_ENUM_SUBLABEL_MENU_RGUI_EXTENDED_ASCII)
DEFAULT_SUBLABEL_MACRO(action_bind_sublabel_menu_rgui_switch_icons, MENU_ENUM_SUBLABEL_MENU_RGUI_SWITCH_ICONS)
Expand Down Expand Up @@ -5565,6 +5566,9 @@ int menu_cbs_init_bind_sublabel(menu_file_list_cbs_t *cbs,
case MENU_ENUM_LABEL_PLAYLIST_USE_FILENAME:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlist_use_filename);
break;
case MENU_ENUM_LABEL_PLAYLIST_ALLOW_NON_PNG:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlist_allow_non_png);
break;
case MENU_ENUM_LABEL_PLAYLIST_USE_OLD_FORMAT:
BIND_ACTION_SUBLABEL(cbs, action_bind_sublabel_playlist_use_old_format);
break;
Expand Down
1 change: 1 addition & 0 deletions menu/menu_displaylist.c
Original file line number Diff line number Diff line change
Expand Up @@ -7032,6 +7032,7 @@ unsigned menu_displaylist_build_list(
{MENU_ENUM_LABEL_CONTENT_RUNTIME_LOG_AGGREGATE, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_PLAYLIST_PORTABLE_PATHS, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_PLAYLIST_USE_FILENAME, PARSE_ONLY_BOOL, true},
{MENU_ENUM_LABEL_PLAYLIST_ALLOW_NON_PNG, PARSE_ONLY_BOOL, true},
#ifdef HAVE_NETWORKING
{MENU_ENUM_LABEL_NETWORK_ON_DEMAND_THUMBNAILS, PARSE_ONLY_BOOL, true},
#endif
Expand Down
16 changes: 16 additions & 0 deletions menu/menu_setting.c
Original file line number Diff line number Diff line change
Expand Up @@ -21848,6 +21848,22 @@ static bool setting_append_list(
SD_FLAG_NONE
);

CONFIG_BOOL(
list, list_info,
&settings->bools.playlist_allow_non_png,
MENU_ENUM_LABEL_PLAYLIST_ALLOW_NON_PNG,
MENU_ENUM_LABEL_VALUE_PLAYLIST_ALLOW_NON_PNG,
DEFAULT_PLAYLIST_ALLOW_NON_PNG,
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
);

#if defined(HAVE_OZONE) || defined(HAVE_XMB)
if (string_is_equal(settings->arrays.menu_driver, "ozone") ||
string_is_equal(settings->arrays.menu_driver, "xmb"))
Expand Down
1 change: 1 addition & 0 deletions msg_hash.h
Original file line number Diff line number Diff line change
Expand Up @@ -4134,6 +4134,7 @@ enum msg_hash_enums
MENU_LABEL(PLAYLIST_SUBLABEL_LAST_PLAYED_STYLE),
MENU_LABEL(PLAYLIST_PORTABLE_PATHS),
MENU_LABEL(PLAYLIST_USE_FILENAME),
MENU_LABEL(PLAYLIST_ALLOW_NON_PNG),

MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_HIST_FAV,
MENU_ENUM_LABEL_VALUE_PLAYLIST_INLINE_CORE_DISPLAY_ALWAYS,
Expand Down

0 comments on commit 06eb5c6

Please sign in to comment.