Main Menu unifications between drivers (#17517)

This commit is contained in:
sonninnos 2025-02-04 17:32:37 +02:00 committed by GitHub
parent b18a6b644b
commit ea22c7c16c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 369 additions and 304 deletions

View File

@ -808,12 +808,7 @@
#endif
#endif
/* Specifies 'add content' visibility when using
* menus WITH a dedicated 'Import Content' tab */
#define DEFAULT_MENU_CONTENT_SHOW_ADD true
/* Specifies 'add content' visibility when using
* menus WITHOUT a dedicated 'Import Content' tab */
#define DEFAULT_MENU_CONTENT_SHOW_ADD_ENTRY MENU_ADD_CONTENT_ENTRY_DISPLAY_PLAYLISTS_TAB
#define DEFAULT_MENU_CONTENT_SHOW_ADD_ENTRY MENU_ADD_CONTENT_ENTRY_DISPLAY_MAIN_TAB
#define DEFAULT_CONTENT_SHOW_PLAYLISTS true

View File

@ -2009,7 +2009,6 @@ static struct config_bool_setting *populate_settings_bool(
SETTING_BOOL("content_show_netplay", &settings->bools.menu_content_show_netplay, true, DEFAULT_CONTENT_SHOW_NETPLAY, false);
#endif
SETTING_BOOL("content_show_history", &settings->bools.menu_content_show_history, true, DEFAULT_CONTENT_SHOW_HISTORY, false);
SETTING_BOOL("content_show_add", &settings->bools.menu_content_show_add, true, DEFAULT_MENU_CONTENT_SHOW_ADD, false);
SETTING_BOOL("content_show_playlists", &settings->bools.menu_content_show_playlists, true, DEFAULT_CONTENT_SHOW_PLAYLISTS, false);
#if defined(HAVE_LIBRETRODB)
SETTING_BOOL("content_show_explore", &settings->bools.menu_content_show_explore, true, DEFAULT_MENU_CONTENT_SHOW_EXPLORE, false);

View File

@ -9594,28 +9594,31 @@ static int materialui_list_push(void *data, void *userdata,
core_info_list_t *list = NULL;
materialui_handle_t *mui = (materialui_handle_t*)userdata;
/* Use common lists for all drivers */
return ret;
if (!mui)
return ret;
switch (type)
{
case DISPLAYLIST_LOAD_CONTENT_LIST:
core_info_get_list(&list);
menu_entries_clear(info->list);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
core_info_get_list(&list);
if (list->info_count > 0)
{
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL);
}
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append(info->list, "/",
@ -9623,11 +9626,12 @@ static int materialui_list_push(void *data, void *userdata,
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
MENU_SETTING_ACTION, 0, 0, NULL);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0, NULL);
if (!config_get_ptr()->bools.kiosk_mode_enable)
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0, NULL);
info->flags |= MD_FLAG_NEED_PUSH | MD_FLAG_NEED_REFRESH;
ret = 0;
@ -9709,6 +9713,15 @@ static int materialui_list_push(void *data, void *userdata,
false);
}
if (settings->bools.menu_content_show_favorites)
{
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
MENU_ENUM_LABEL_GOTO_FAVORITES,
MENU_SETTING_ACTION, 0, 0, NULL);
}
if (settings->bools.menu_show_load_disc)
{
MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(

View File

@ -1549,7 +1549,6 @@ static ozone_theme_t ozone_theme_purple_rain = {
{0}, /* textures */
/* No theme assets */
"purple_rain" /* name */
};
@ -1914,15 +1913,21 @@ static uintptr_t ozone_entries_icon_get_texture(
/* Menu collection submenus */
case MENU_ENUM_LABEL_PLAYLISTS_TAB:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_ZIP];
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_PLAYLIST];
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_HISTORY];
case MENU_ENUM_LABEL_GOTO_FAVORITES:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FAVORITE];
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FAVORITES];
#ifdef HAVE_IMAGEVIEWER
case MENU_ENUM_LABEL_GOTO_IMAGES:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_IMAGE];
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_IMAGES];
#endif
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
case MENU_ENUM_LABEL_GOTO_VIDEO:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIE];
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIES];
#endif
case MENU_ENUM_LABEL_GOTO_MUSIC:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MUSIC];
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MUSICS];
case MENU_ENUM_LABEL_GOTO_EXPLORE:
if (!string_is_equal(enum_path, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE)))
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CURSOR];
@ -2178,9 +2183,10 @@ static uintptr_t ozone_entries_icon_get_texture(
case MENU_ENUM_LABEL_USER_SETTINGS:
case MENU_ENUM_LABEL_SETTINGS_SHOW_USER:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_USER];
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MENU_ADD];
case MENU_ENUM_LABEL_DIRECTORY_SETTINGS:
case MENU_ENUM_LABEL_SETTINGS_SHOW_DIRECTORY:
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
case MENU_ENUM_LABEL_SCAN_DIRECTORY:
case MENU_ENUM_LABEL_MANUAL_CONTENT_SCAN_LIST:
case MENU_ENUM_LABEL_VIDEO_SHADER_PRESET_SAVE_PARENT:
@ -2199,6 +2205,8 @@ static uintptr_t ozone_entries_icon_get_texture(
case MENU_ENUM_LABEL_CHEEVOS_APPEARANCE_SETTINGS:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_NOTIFICATIONS];
#ifdef HAVE_NETWORKING
case MENU_ENUM_LABEL_NETPLAY:
return ozone->tab_textures[OZONE_TAB_TEXTURE_NETWORK];
case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RUN];
case MENU_ENUM_LABEL_NETPLAY_DISCONNECT:
@ -2301,7 +2309,32 @@ static uintptr_t ozone_entries_icon_get_texture(
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FOLDER];
case FILE_TYPE_PLAIN:
case FILE_TYPE_IN_CARCHIVE:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FILE];
case FILE_TYPE_RPL_ENTRY:
case FILE_TYPE_PLAYLIST_COLLECTION:
switch (ozone->tabs[ozone->categories_selection_ptr])
{
case OZONE_SYSTEM_TAB_MAIN:
if (string_is_equal(ozone->title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MUSIC_TAB)))
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MUSIC];
else if (string_is_equal(ozone->title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_IMAGES_TAB)))
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_IMAGE];
else if (string_is_equal(ozone->title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_TAB)))
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIE];
break;
case OZONE_SYSTEM_TAB_MUSIC:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MUSIC];
#ifdef HAVE_IMAGEVIEWER
case OZONE_SYSTEM_TAB_IMAGES:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_IMAGE];
#endif
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
case OZONE_SYSTEM_TAB_VIDEO:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_MOVIE];
#endif
default:
break;
}
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FILE];
case FILE_TYPE_SHADER:
case FILE_TYPE_SHADER_PRESET:
@ -2318,8 +2351,6 @@ static uintptr_t ozone_entries_icon_get_texture(
case FILE_TYPE_CORE:
case FILE_TYPE_DIRECT_LOAD:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_CORE];
case FILE_TYPE_PLAYLIST_COLLECTION:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FILE];
case FILE_TYPE_RDB:
return ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_RDB];
case FILE_TYPE_RDB_ENTRY:
@ -3665,21 +3696,18 @@ static void ozone_thumbnail_bar_hide_end(void *userdata)
ozone->flags |= OZONE_FLAG_NEED_COMPUTE;
}
static bool ozone_is_load_content_playlist(void *userdata)
static bool ozone_is_main_menu_playlist(void *userdata)
{
ozone_handle_t *ozone = (ozone_handle_t*)userdata;
menu_entry_t entry;
if ( (ozone->depth != 4)
if ( (ozone->depth != 3)
|| (ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST)
|| (ozone->flags & OZONE_FLAG_IS_FILE_LIST))
return false;
MENU_ENTRY_INITIALIZE(entry);
entry.flags |= MENU_ENTRY_FLAG_LABEL_ENABLED
| MENU_ENTRY_FLAG_RICH_LABEL_ENABLED;
menu_entry_get(&entry, 0, 0, NULL, true);
return entry.type == FILE_TYPE_RPL_ENTRY;
}
@ -3927,7 +3955,7 @@ static bool ozone_is_playlist(ozone_handle_t *ozone, bool depth)
switch (ozone->tabs[ozone->categories_selection_ptr])
{
case OZONE_SYSTEM_TAB_MAIN:
if (ozone_is_load_content_playlist(ozone))
if (ozone_is_main_menu_playlist(ozone))
return true;
case OZONE_SYSTEM_TAB_SETTINGS:
case OZONE_SYSTEM_TAB_ADD:
@ -3991,8 +4019,8 @@ static void ozone_sidebar_update_collapse(
if (ozone_get_horizontal_selection_type(ozone) == MENU_EXPLORE_TAB)
is_playlist = true;
/* Playlists under 'Load Content' don't need sidebar animations */
if (is_playlist && ozone->depth > 3)
/* Playlists under "Main Menu" don't need sidebar animations */
if (is_playlist && ozone->depth > 2)
goto end;
/* To collapse or not to collapse */
@ -5893,9 +5921,9 @@ border_iterate:
else if (ozone->depth == 3 && entry.enum_idx == MENU_ENUM_LABEL_PLAYLIST_MANAGER_SETTINGS)
{
if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_HISTORY_TAB)))
texture = ozone->tab_textures[OZONE_TAB_TEXTURE_HISTORY];
texture = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_HISTORY];
else if (string_is_equal(entry.rich_label, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES_TAB)))
texture = ozone->tab_textures[OZONE_TAB_TEXTURE_FAVORITES];
texture = ozone->icons_textures[OZONE_ENTRIES_ICONS_TEXTURE_FAVORITES];
else if (i < ozone->horizontal_list.size)
{
ozone_node_t *sidebar_node = NULL;
@ -5915,10 +5943,10 @@ border_iterate:
texture = sidebar_node->icon;
}
}
/* "Load Content" playlists */
/* "Main Menu" playlists */
else if (ozone->tabs[ozone->categories_selection_ptr] == OZONE_SYSTEM_TAB_MAIN)
{
if (ozone_is_load_content_playlist(ozone))
if (ozone_is_main_menu_playlist(ozone))
{
const struct playlist_entry *pl_entry = NULL;
ozone_node_t *db_node = NULL;
@ -5931,7 +5959,7 @@ border_iterate:
&& (db_node = RHMAP_GET_STR(ozone->playlist_db_node_map, pl_entry->db_name)))
texture = db_node->content_icon;
}
else if (ozone->depth == 3 && entry.type == FILE_TYPE_PLAYLIST_COLLECTION)
else if (ozone->depth == 2 && entry.type == FILE_TYPE_PLAYLIST_COLLECTION)
{
ozone_node_t *sidebar_node = (ozone_node_t*)
file_list_get_userdata_at_offset(&ozone->horizontal_list,
@ -5947,6 +5975,7 @@ border_iterate:
{
switch (ozone->tabs[ozone->categories_selection_ptr])
{
case OZONE_SYSTEM_TAB_MAIN:
case OZONE_SYSTEM_TAB_HISTORY:
case OZONE_SYSTEM_TAB_FAVORITES:
{
@ -8872,10 +8901,10 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
if ( settings->bools.menu_content_show_settings
&& !settings->bools.kiosk_mode_enable)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_SETTINGS;
if (settings->bools.menu_content_show_favorites)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
if (settings->bools.menu_content_show_history)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_HISTORY;
if (settings->bools.menu_content_show_favorites)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_FAVORITES;
#ifdef HAVE_IMAGEVIEWER
if (settings->bools.menu_content_show_images)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_IMAGES;
@ -8886,15 +8915,15 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
if (settings->bools.menu_content_show_video)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_VIDEO;
#endif
#if 0 /* Move Netplay and Import Content to Main Menu */
#ifdef HAVE_NETWORKING
if (settings->bools.menu_content_show_netplay)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_NETPLAY;
#endif
if ( settings->bools.menu_content_show_add
&& !settings->bools.kiosk_mode_enable)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_ADD;
#endif /* 0 */
#if defined(HAVE_DYNAMIC)
if (settings->uints.menu_content_show_contentless_cores !=
MENU_CONTENTLESS_CORES_DISPLAY_NONE)
@ -9659,7 +9688,9 @@ static int ozone_list_push(void *data, void *userdata,
menu_displaylist_info_t *info, unsigned type)
{
int ret = -1;
core_info_list_t *list = NULL;
/* Use common lists for all drivers */
return ret;
switch (type)
{
@ -9668,24 +9699,18 @@ static int ozone_list_push(void *data, void *userdata,
settings_t *settings = config_get_ptr();
bool menu_content_show_playlists = settings->bools.menu_content_show_playlists;
bool kiosk_mode_enable = settings->bools.kiosk_mode_enable;
core_info_list_t *list = NULL;
core_info_get_list(&list);
menu_entries_clear(info->list);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
core_info_get_list(&list);
if (list && list->info_count > 0)
{
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL);
}
if (menu_content_show_playlists)
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
@ -9693,6 +9718,13 @@ static int ozone_list_push(void *data, void *userdata,
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0, NULL);
if (list && list->info_count > 0)
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append(info->list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
@ -9700,13 +9732,11 @@ static int ozone_list_push(void *data, void *userdata,
MENU_SETTING_ACTION, 0, 0, NULL);
if (!kiosk_mode_enable)
{
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0, NULL);
}
info->flags |= MD_FLAG_NEED_PUSH | MD_FLAG_NEED_REFRESH;
ret = 0;
@ -10300,7 +10330,7 @@ static void ozone_render(void *data,
menu_st->selection_ptr = i;
/* If this is a playlist, must update thumbnails */
if ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 4))
if ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 3))
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST))
{
ozone->flags &= ~OZONE_FLAG_SKIP_THUMBNAIL_RESET;
@ -10336,7 +10366,7 @@ static void ozone_render(void *data,
}
/* If this is a playlist, must update thumbnails */
else if ((ozone->flags & OZONE_FLAG_IS_PLAYLIST)
&& (ozone->depth == 1 || ozone->depth == 4))
&& (ozone->depth == 1 || ozone->depth == 3))
{
ozone_set_thumbnail_content(ozone, "");
ozone_update_thumbnail_image(ozone);
@ -11552,7 +11582,7 @@ static void ozone_selection_changed(ozone_handle_t *ozone, bool allow_animation)
/* Playlist updates */
if ( (ozone->flags & OZONE_FLAG_IS_PLAYLIST)
&& (ozone->depth == 1 || ozone->depth == 4))
&& (ozone->depth == 1 || ozone->depth == 3))
{
ozone_set_thumbnail_content(ozone, "");
update_thumbnails = true;
@ -12438,7 +12468,7 @@ static void ozone_populate_entries(
* and savestate slots */
if (
( (ozone->flags & OZONE_FLAG_WANT_THUMBNAIL_BAR))
&& ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 4))
&& ( ((ozone->flags & OZONE_FLAG_IS_PLAYLIST) && (ozone->depth == 1 || ozone->depth == 3))
|| ((ozone->flags & OZONE_FLAG_IS_DB_MANAGER_LIST) && (ozone->depth >= 4))
|| (ozone->flags & OZONE_FLAG_IS_EXPLORE_LIST)
|| (ozone->flags & OZONE_FLAG_IS_FILE_LIST)

View File

@ -128,6 +128,7 @@ enum
#endif
#ifdef HAVE_NETWORKING
XMB_TEXTURE_NETPLAY,
XMB_TEXTURE_NETPLAY_ALT,
XMB_TEXTURE_ROOM,
XMB_TEXTURE_ROOM_LAN,
XMB_TEXTURE_ROOM_RELAY,
@ -1150,8 +1151,8 @@ static char *xmb_path_dynamic_wallpaper(xmb_handle_t *xmb)
path[0] = '\0';
/* Do not update wallpaper in "Load Content" playlists and inside playlist items */
if ( (xmb->categories_selection_ptr == XMB_SYSTEM_TAB_MAIN && depth > 4)
/* Do not update wallpaper in "Main Menu" playlists and inside playlist items */
if ( (xmb->categories_selection_ptr == XMB_SYSTEM_TAB_MAIN && depth > 3)
|| (xmb->categories_selection_ptr > xmb->system_tab_end && depth > 1))
{
if (string_is_empty(xmb->bg_file_path))
@ -2082,7 +2083,7 @@ static void xmb_list_open_new(xmb_handle_t *xmb,
{
if (xmb->is_playlist || xmb->is_db_manager_list || xmb->is_explore_list)
{
if ( !(xmb->is_db_manager_list && xmb->depth > 4)
if ( !(xmb->is_db_manager_list && xmb->depth > 3)
&& !xmb->skip_thumbnail_reset)
xmb_unload_thumbnail_textures(xmb);
@ -2987,6 +2988,7 @@ static void xmb_populate_entries(void *data,
#endif
)
)
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY))
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_PLAYLIST_LIST))
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_FAVORITES_LIST))
|| string_is_equal(label, msg_hash_to_str(MENU_ENUM_LABEL_DEFERRED_IMAGES_LIST))
@ -3297,28 +3299,35 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_DOWNLOAD_CORE_CONTENT_DIRS:
return xmb->textures.list[XMB_TEXTURE_FOLDER];
case MENU_ENUM_LABEL_ADD_CONTENT_LIST:
return xmb->textures.list[XMB_TEXTURE_ADD];
return xmb->textures.list[XMB_TEXTURE_MENU_ADD];
case MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR:
case MENU_ENUM_LABEL_VALUE_CONTENTLESS_CORES_TAB:
return xmb->textures.list[XMB_TEXTURE_RDB];
/* Menu collection submenus */
case MENU_ENUM_LABEL_PLAYLISTS_TAB:
return xmb->textures.list[XMB_TEXTURE_ZIP];
return xmb->textures.list[XMB_TEXTURE_PLAYLIST];
case MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY:
return xmb->textures.list[XMB_TEXTURE_HISTORY];
case MENU_ENUM_LABEL_GOTO_FAVORITES:
return xmb->textures.list[XMB_TEXTURE_FAVORITE];
return xmb->textures.list[XMB_TEXTURE_FAVORITES];
#ifdef HAVE_IMAGEVIEWER
case MENU_ENUM_LABEL_GOTO_IMAGES:
return xmb->textures.list[XMB_TEXTURE_IMAGE];
return xmb->textures.list[XMB_TEXTURE_IMAGES];
#endif
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
case MENU_ENUM_LABEL_GOTO_VIDEO:
return xmb->textures.list[XMB_TEXTURE_MOVIE];
return xmb->textures.list[XMB_TEXTURE_MOVIES];
#endif
case MENU_ENUM_LABEL_GOTO_MUSIC:
return xmb->textures.list[XMB_TEXTURE_MUSIC];
return xmb->textures.list[XMB_TEXTURE_MUSICS];
case MENU_ENUM_LABEL_GOTO_EXPLORE:
if (!string_is_equal(enum_path, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE)))
return xmb->textures.list[XMB_TEXTURE_CURSOR];
return xmb->textures.list[XMB_TEXTURE_RDB];
case MENU_ENUM_LABEL_GOTO_CONTENTLESS_CORES:
return xmb->textures.list[XMB_TEXTURE_CORE];
case MENU_ENUM_LABEL_LOAD_DISC:
case MENU_ENUM_LABEL_DUMP_DISC:
#ifdef HAVE_LAKKA
@ -3561,6 +3570,8 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
case MENU_ENUM_LABEL_CHEEVOS_APPEARANCE_SETTINGS:
return xmb->textures.list[XMB_TEXTURE_NOTIFICATIONS];
#ifdef HAVE_NETWORKING
case MENU_ENUM_LABEL_NETPLAY:
return xmb->textures.list[XMB_TEXTURE_NETPLAY];
case MENU_ENUM_LABEL_NETPLAY_ENABLE_HOST:
return xmb->textures.list[XMB_TEXTURE_RUN];
case MENU_ENUM_LABEL_NETPLAY_DISCONNECT:
@ -3665,10 +3676,17 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
break;
}
}
else
{
if (string_is_equal(xmb->title_name, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MUSIC_TAB)))
return xmb->textures.list[XMB_TEXTURE_MUSIC];
else if (string_is_equal(xmb->title_name, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_IMAGES_TAB)))
return xmb->textures.list[XMB_TEXTURE_IMAGE];
else if (string_is_equal(xmb->title_name, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_VIDEO_TAB)))
return xmb->textures.list[XMB_TEXTURE_MOVIE];
}
}
break;
case XMB_SYSTEM_TAB_FAVORITES:
return xmb->textures.list[XMB_TEXTURE_FAVORITE];
case XMB_SYSTEM_TAB_MUSIC:
return xmb->textures.list[XMB_TEXTURE_MUSIC];
#ifdef HAVE_IMAGEVIEWER
@ -4981,9 +4999,15 @@ static int xmb_draw_item(
node->zoom = xmb->items_active_zoom;
}
/* Differentiate the basic setting icon from the rest */
if (texture == xmb->textures.list[XMB_TEXTURE_SUBSETTING])
gfx_display_set_alpha(color, MIN(node->alpha / 3, xmb->alpha));
if (i != current && list != &xmb->selection_buf_old)
{
/* Differentiate the basic setting icon from the rest */
if (texture == xmb->textures.list[XMB_TEXTURE_SUBSETTING])
gfx_display_set_alpha(color, MIN(node->alpha / 2.4f, xmb->alpha));
/* Highlight active icon more by dimming all passives */
else
gfx_display_set_alpha(color, MIN(node->alpha / 1.2f, xmb->alpha));
}
/* Explore list correction hack for not showing wrong icons as "previous" icon */
if (xmb->is_explore_list && !xmb->is_quick_menu && texture)
@ -5018,8 +5042,8 @@ static int xmb_draw_item(
texture = sidebar_node->icon;
}
}
/* "Load Content" playlists */
else if (xmb->depth == 3 && entry_type == FILE_TYPE_PLAYLIST_COLLECTION)
/* "Main Menu" playlists */
else if (xmb->depth == 2 && entry_type == FILE_TYPE_PLAYLIST_COLLECTION)
{
xmb_node_t *sidebar_node = (xmb_node_t*) file_list_get_userdata_at_offset(&xmb->horizontal_list, list->list[i].entry_idx);
if (sidebar_node && sidebar_node->icon)
@ -5033,12 +5057,16 @@ static int xmb_draw_item(
{
case XMB_SYSTEM_TAB_MAIN:
{
/* Special fall-through for "Load Content" > Playlists > Favorites */
/* Special fall-through for "Main Menu" > Playlists > History/Favorites */
char title[NAME_MAX_LENGTH];
menu_entries_get_title(title, sizeof(title));
if (string_is_equal(title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES)))
if ( string_is_equal(title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY))
|| string_is_equal(title, msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES)))
; /* no-op */
else if (xmb->depth == 5)
/* Force "Main Menu" playlists to use content icon while
* inside the playlist content regardless of the option,
* since playlists themselves use the main icon */
else if (xmb->depth == 4)
show_history_icons = PLAYLIST_SHOW_HISTORY_ICONS_CONTENT;
else
break;
@ -5049,8 +5077,7 @@ static int xmb_draw_item(
const struct playlist_entry *pl_entry = NULL;
xmb_node_t *db_node = NULL;
playlist_get_index(playlist_get_cached(),
entry.entry_idx, &pl_entry);
playlist_get_index(playlist_get_cached(), entry.entry_idx, &pl_entry);
if ( pl_entry
&& !string_is_empty(pl_entry->db_name)
@ -5143,11 +5170,13 @@ static int xmb_draw_item(
if (texture_switch != 0 && color[3] != 0 && !xmb->assets_missing)
{
if (texture_switch == xmb->textures.list[XMB_TEXTURE_SWITCH_OFF])
gfx_display_set_alpha(color, MIN(node->alpha / 2, xmb->alpha));
else
gfx_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
if (list != &xmb->selection_buf_old)
{
if (texture_switch == xmb->textures.list[XMB_TEXTURE_SWITCH_OFF])
gfx_display_set_alpha(color, MIN(node->alpha / 2, xmb->alpha));
else
gfx_display_set_alpha(color, MIN(node->alpha, xmb->alpha));
}
xmb_draw_icon(
userdata,
p_disp,
@ -7522,9 +7551,9 @@ static void xmb_layout_ps3(xmb_handle_t *xmb, int width)
xmb->items_passive_zoom = 0.5;
xmb->categories_active_alpha = 1.0;
xmb->categories_passive_alpha = 0.85;
xmb->categories_passive_alpha = 0.75;
xmb->items_active_alpha = 1.0;
xmb->items_passive_alpha = 0.85;
xmb->items_passive_alpha = 0.75;
xmb->shadow_offset = 3.0 * scale_factor;
if (xmb->shadow_offset < 1.0)
@ -7577,9 +7606,9 @@ static void xmb_layout_psp(xmb_handle_t *xmb, int width)
xmb->items_passive_zoom = 0.5;
xmb->categories_active_alpha = 1.0;
xmb->categories_passive_alpha = 0.85;
xmb->categories_passive_alpha = 0.75;
xmb->items_active_alpha = 1.0;
xmb->items_passive_alpha = 0.85;
xmb->items_passive_alpha = 0.75;
xmb->shadow_offset = 3.0 * scale_factor;
if (xmb->shadow_offset < 1.0)
@ -7815,10 +7844,10 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
if ( settings->bools.menu_content_show_settings
&& !settings->bools.kiosk_mode_enable)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_SETTINGS;
if (settings->bools.menu_content_show_favorites)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
if (settings->bools.menu_content_show_history)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_HISTORY;
if (settings->bools.menu_content_show_favorites)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_FAVORITES;
#ifdef HAVE_IMAGEVIEWER
if (settings->bools.menu_content_show_images)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_IMAGES;
@ -7829,15 +7858,15 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
if (settings->bools.menu_content_show_video)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_VIDEO;
#endif
#if 0 /* Move Netplay and Import Content to Main Menu */
#ifdef HAVE_NETWORKING
if (settings->bools.menu_content_show_netplay)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY;
#endif
if ( settings->bools.menu_content_show_add
&& !settings->bools.kiosk_mode_enable)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD;
#endif /* 0 */
#if defined(HAVE_DYNAMIC)
if (settings->uints.menu_content_show_contentless_cores != MENU_CONTENTLESS_CORES_DISPLAY_NONE)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_CONTENTLESS_CORES;
@ -8094,6 +8123,8 @@ static const char *xmb_texture_path(unsigned id)
#ifdef HAVE_NETWORKING
case XMB_TEXTURE_NETPLAY:
return "netplay.png";
case XMB_TEXTURE_NETPLAY_ALT:
return "../../../ozone/png/sidebar/netplay.png";
case XMB_TEXTURE_ROOM:
return "menu_room.png";
case XMB_TEXTURE_ROOM_LAN:
@ -8244,7 +8275,20 @@ static bool xmb_context_reset_textures(
for (i = 0; i < XMB_TEXTURE_LAST; i++)
{
if (!gfx_display_reset_textures_list(xmb_texture_path(i), iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
/* Use Ozone sidebar icon for netplay icon instead if it exists */
const char *texture_path = xmb_texture_path(i);
#ifdef HAVE_NETWORKING
if (i == XMB_TEXTURE_NETPLAY && menu_xmb_theme == XMB_ICON_THEME_MONOCHROME)
{
char texpath[PATH_MAX_LENGTH];
fill_pathname_join_special(texpath,
iconpath, xmb_texture_path(XMB_TEXTURE_NETPLAY_ALT), sizeof(texpath));
if (path_is_valid(texpath))
texture_path = xmb_texture_path(XMB_TEXTURE_NETPLAY_ALT);
}
#endif
if (!gfx_display_reset_textures_list(texture_path, iconpath, &xmb->textures.list[i], TEXTURE_FILTER_MIPMAP_LINEAR, NULL, NULL))
{
/* New extra battery icons could be missing */
if ( i == XMB_TEXTURE_BATTERY_80
@ -8258,6 +8302,7 @@ static bool xmb_context_reset_textures(
return false;
continue;
}
/* If the icon is missing return the subsetting (because some themes are incomplete) */
if ( !( i == XMB_TEXTURE_DIALOG_SLICE
|| i == XMB_TEXTURE_KEY_HOVER
@ -8270,7 +8315,7 @@ static bool xmb_context_reset_textures(
/* Do not draw icons if subsetting is missing */
return false;
}
/* Do not draw icons if this ones are is missing */
/* Do not draw icons if these are missing */
switch (i)
{
case XMB_TEXTURE_POINTER:
@ -8921,16 +8966,27 @@ static int xmb_list_push(void *data, void *userdata,
= settings->paths.menu_content_show_settings_password;
const char *kiosk_mode_password = settings->paths.kiosk_mode_password;
/* Use common lists for all drivers */
return -1;
switch (type)
{
case DISPLAYLIST_LOAD_CONTENT_LIST:
menu_entries_clear(info->list);
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL);
if (menu_content_show_pl)
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0, NULL);
core_info_get_list(&list);
if (list->info_count > 0)
menu_entries_append(info->list,
@ -8939,13 +8995,6 @@ static int xmb_list_push(void *data, void *userdata,
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL);
if (menu_content_show_pl)
menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0, NULL);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append(info->list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),

View File

@ -4360,32 +4360,30 @@ static unsigned menu_displaylist_parse_playlists(
if (!horizontal)
{
bool show_add_content = false;
#if defined(HAVE_XMB) || defined(HAVE_OZONE)
const char *menu_ident = menu_driver_ident();
if ( string_is_equal(menu_ident, "xmb")
|| string_is_equal(menu_ident, "ozone"))
show_add_content = settings->bools.menu_content_show_add;
else
#endif
show_add_content = (settings->uints.menu_content_show_add_entry ==
MENU_ADD_CONTENT_ENTRY_DISPLAY_PLAYLISTS_TAB);
bool show_add_content = (settings->uints.menu_content_show_add_entry ==
MENU_ADD_CONTENT_ENTRY_DISPLAY_PLAYLISTS_TAB);
bool show_history = !string_is_equal(menu_ident, "rgui")
&& !(string_is_equal(menu_ident, "glui") && !settings->bools.menu_materialui_show_nav_bar);
if (show_add_content)
if (menu_entries_append(info_list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_ADD_CONTENT_LIST),
MENU_ENUM_LABEL_ADD_CONTENT_LIST,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (show_history)
{
if (settings->bools.menu_content_show_history)
if (menu_entries_append(info_list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_LOAD_CONTENT_HISTORY),
msg_hash_to_str(MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY),
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (settings->bools.menu_content_show_favorites)
if (menu_entries_append(info_list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
MENU_ENUM_LABEL_GOTO_FAVORITES,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (settings->bools.menu_content_show_favorites)
if (menu_entries_append(info_list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
MENU_ENUM_LABEL_GOTO_FAVORITES,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
}
if (settings->bools.menu_content_show_images)
if (menu_entries_append(info_list,
@ -4413,6 +4411,14 @@ static unsigned menu_displaylist_parse_playlists(
count++;
#endif
if (show_add_content)
if (menu_entries_append(info_list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_ADD_CONTENT_LIST),
MENU_ENUM_LABEL_ADD_CONTENT_LIST,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
#if defined(HAVE_DYNAMIC)
if (settings->uints.menu_content_show_contentless_cores !=
MENU_CONTENTLESS_CORES_DISPLAY_NONE)
@ -4433,7 +4439,6 @@ static unsigned menu_displaylist_parse_playlists(
MENU_EXPLORE_TAB, 0, 0, NULL))
count++;
#endif
}
if (!dir_list_initialize(&str_list, path, NULL, true,
@ -7935,108 +7940,45 @@ unsigned menu_displaylist_build_list(
break;
case DISPLAYLIST_LOAD_CONTENT_LIST:
case DISPLAYLIST_LOAD_CONTENT_SPECIAL:
{
const char *dir_menu_content = settings->paths.directory_menu_content;
bool menu_content_show_favorites = settings->bools.menu_content_show_favorites;
{
const char *menu_ident = menu_driver_ident();
core_info_list_t *info_list = NULL;
if (!string_is_empty(dir_menu_content))
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL))
count++;
core_info_get_list(&info_list);
if (menu_content_show_favorites)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
MENU_ENUM_LABEL_GOTO_FAVORITES,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (!string_is_empty(settings->paths.directory_menu_content))
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_FAVORITES),
MENU_ENUM_LABEL_FAVORITES,
MENU_SETTING_ACTION_FAVORITES_DIR, 0, 0, NULL))
count++;
if (settings->bools.menu_content_show_images)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_IMAGES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_IMAGES),
MENU_ENUM_LABEL_GOTO_IMAGES,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (info_list && info_list->info_count > 0)
if (menu_entries_append(list,
msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (settings->bools.menu_content_show_music)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_MUSIC),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_MUSIC),
MENU_ENUM_LABEL_GOTO_MUSIC,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
#if defined(HAVE_FFMPEG) || defined(HAVE_MPV)
if (settings->bools.menu_content_show_video)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_VIDEO),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_VIDEO),
MENU_ENUM_LABEL_GOTO_VIDEO,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
#endif
#if defined(HAVE_DYNAMIC)
if (settings->uints.menu_content_show_contentless_cores !=
MENU_CONTENTLESS_CORES_DISPLAY_NONE)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_CONTENTLESS_CORES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_CONTENTLESS_CORES),
MENU_ENUM_LABEL_GOTO_CONTENTLESS_CORES,
MENU_CONTENTLESS_CORES_TAB, 0, 0, NULL))
count++;
#endif
#if defined(HAVE_LIBRETRODB)
if (settings->bools.menu_content_show_explore)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_EXPLORE),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_EXPLORE),
MENU_ENUM_LABEL_GOTO_EXPLORE,
MENU_EXPLORE_TAB, 0, 0, NULL))
count++;
#endif
}
{
core_info_list_t *info_list = NULL;
core_info_get_list(&info_list);
if (info_list && info_list->info_count > 0)
{
if (menu_entries_append(list,
msg_hash_to_str(
MENU_ENUM_LABEL_VALUE_DOWNLOADED_FILE_DETECT_CORE_LIST),
msg_hash_to_str(
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST),
MENU_ENUM_LABEL_DOWNLOADED_FILE_DETECT_CORE_LIST,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
}
}
{
bool menu_content_show_playlists = settings->bools.menu_content_show_playlists;
if (menu_content_show_playlists)
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
}
if (frontend_driver_parse_drive_list(list, true) != 0)
if ( !settings->bools.kiosk_mode_enable
&& frontend_driver_parse_drive_list(list, true) != 0)
if (menu_entries_append(list, "/",
msg_hash_to_str(MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR),
MENU_ENUM_LABEL_FILE_DETECT_CORE_LIST_PUSH_DIR,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
if (!settings->bools.kiosk_mode_enable)
menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_MENU_FILE_BROWSER_SETTINGS),
msg_hash_to_str(MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS),
MENU_ENUM_LABEL_MENU_FILE_BROWSER_SETTINGS,
MENU_SETTING_ACTION, 0, 0, NULL);
#if 0
if (menu_entries_append(list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_BROWSE_URL_LIST),
@ -8046,6 +7988,7 @@ unsigned menu_displaylist_build_list(
count++;
#endif
break;
}
case DISPLAYLIST_INPUT_MENU_SETTINGS_LIST:
{
menu_displaylist_build_info_selective_t build_list[] = {
@ -10099,6 +10042,20 @@ unsigned menu_displaylist_build_list(
#ifdef HAVE_LAKKA
{MENU_ENUM_LABEL_MENU_SHOW_EJECT_DISC, PARSE_ONLY_BOOL, true },
#endif
{MENU_ENUM_LABEL_CONTENT_SHOW_ADD_ENTRY, PARSE_ONLY_UINT, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLISTS, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_HISTORY, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_MUSIC, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_VIDEO, PARSE_ONLY_BOOL, true },
#if defined(HAVE_DYNAMIC)
{MENU_ENUM_LABEL_CONTENT_SHOW_CONTENTLESS_CORES, PARSE_ONLY_UINT, true },
#endif
{MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS_PASSWORD, PARSE_ONLY_STRING, true},
{MENU_ENUM_LABEL_CONTENT_SHOW_NETPLAY, PARSE_ONLY_BOOL, true },
#ifdef HAVE_ONLINE_UPDATER
{MENU_ENUM_LABEL_MENU_SHOW_ONLINE_UPDATER, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_SHOW_CORE_UPDATER, PARSE_ONLY_BOOL, true },
@ -10118,21 +10075,6 @@ unsigned menu_displaylist_build_list(
{MENU_ENUM_LABEL_MENU_SHOW_RESTART_RETROARCH, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_SHOW_REBOOT, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_MENU_SHOW_SHUTDOWN, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_SETTINGS_PASSWORD, PARSE_ONLY_STRING, true},
{MENU_ENUM_LABEL_CONTENT_SHOW_FAVORITES, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_HISTORY, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_IMAGES, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_MUSIC, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_VIDEO, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_NETPLAY, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_ADD, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_ADD_ENTRY, PARSE_ONLY_UINT, true },
#if defined(HAVE_DYNAMIC)
{MENU_ENUM_LABEL_CONTENT_SHOW_CONTENTLESS_CORES, PARSE_ONLY_UINT, true },
#endif
{MENU_ENUM_LABEL_CONTENT_SHOW_EXPLORE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_CONTENT_SHOW_PLAYLISTS, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_TIMEDATE_ENABLE, PARSE_ONLY_BOOL, true },
{MENU_ENUM_LABEL_TIMEDATE_STYLE, PARSE_ONLY_UINT, true },
{MENU_ENUM_LABEL_TIMEDATE_DATE_SEPARATOR, PARSE_ONLY_UINT, true },
@ -14989,12 +14931,19 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
case DISPLAYLIST_MAIN_MENU:
menu_entries_clear(info->list);
{
rarch_system_info_t *sys_info = &runloop_state_get_ptr()->system;
bool show_add_content = false;
#if defined(HAVE_RGUI) || defined(HAVE_MATERIALUI) || defined(HAVE_OZONE) || defined(HAVE_XMB)
const char *menu_ident = menu_driver_ident();
#endif
uint32_t flags = runloop_get_flags();
rarch_system_info_t *sys_info = &runloop_state_get_ptr()->system;
const char *menu_ident = menu_driver_ident();
uint32_t flags = runloop_get_flags();
bool show_playlists = settings->bools.menu_content_show_playlists;
bool show_add_content = (settings->uints.menu_content_show_add_entry ==
MENU_ADD_CONTENT_ENTRY_DISPLAY_MAIN_TAB) && !settings->bools.kiosk_mode_enable;
bool show_settings = settings->bools.menu_content_show_settings
&& ( (string_is_equal(menu_ident, "rgui"))
|| (string_is_equal(menu_ident, "glui") && !settings->bools.menu_materialui_show_nav_bar));
if ( string_is_equal(menu_ident, "glui")
&& settings->bools.menu_materialui_show_nav_bar)
show_playlists = false;
if (flags & RUNLOOP_FLAG_CORE_RUNNING)
{
@ -15043,11 +14992,24 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
}
}
if (settings->bools.menu_content_show_history)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
PARSE_ACTION, false) == 0)
count++;
/* Show History and Favorites in menus without sidebar/tabs */
if ( (string_is_equal(menu_ident, "rgui"))
|| (string_is_equal(menu_ident, "glui") && !settings->bools.menu_materialui_show_nav_bar))
{
if (settings->bools.menu_content_show_history)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_LOAD_CONTENT_HISTORY,
PARSE_ACTION, false) == 0)
count++;
if (settings->bools.menu_content_show_favorites)
if (menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_GOTO_FAVORITES),
msg_hash_to_str(MENU_ENUM_LABEL_GOTO_FAVORITES),
MENU_ENUM_LABEL_GOTO_FAVORITES,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
}
#ifdef HAVE_CDROM
if (settings->bools.menu_show_load_disc)
@ -15075,33 +15037,22 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
count++;
}
#endif /* HAVE_LAKKA */
#endif
#endif /* HAVE_CDROM */
#if defined(HAVE_RGUI) || defined(HAVE_MATERIALUI)
if (( string_is_equal(menu_ident, "rgui")
|| string_is_equal(menu_ident, "glui"))
&& settings->bools.menu_content_show_playlists)
if (show_playlists)
if (menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),
msg_hash_to_str(MENU_ENUM_LABEL_PLAYLISTS_TAB),
MENU_ENUM_LABEL_PLAYLISTS_TAB,
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
#endif
#if defined(HAVE_XMB) || defined(HAVE_OZONE)
if ( string_is_equal(menu_ident, "xmb")
|| string_is_equal(menu_ident, "ozone"))
show_add_content = settings->bools.menu_content_show_add;
else
#endif
show_add_content = (settings->uints.menu_content_show_add_entry ==
MENU_ADD_CONTENT_ENTRY_DISPLAY_MAIN_TAB);
if (show_add_content)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
if (menu_entries_append(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_ADD_CONTENT_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_ADD_CONTENT_LIST),
MENU_ENUM_LABEL_ADD_CONTENT_LIST,
PARSE_ACTION, false) == 0)
MENU_SETTING_ACTION, 0, 0, NULL))
count++;
#ifdef HAVE_NETWORKING
@ -15110,64 +15061,117 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
MENU_ENUM_LABEL_NETPLAY,
PARSE_ACTION, false) == 0)
count++;
#endif
#ifdef HAVE_ONLINE_UPDATER
if (settings->bools.menu_show_online_updater)
if ( settings->bools.menu_show_online_updater
&& !settings->bools.kiosk_mode_enable)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_ONLINE_UPDATER,
PARSE_ACTION, false) == 0)
count++;
#endif
#endif /* HAVE_ONLINE_UPDATER */
#endif /* HAVE_NETWORKING */
#ifdef HAVE_MIST
if (settings->bools.menu_show_core_manager_steam)
if ( settings->bools.menu_show_core_manager_steam
&& !settings->bools.kiosk_mode_enable)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_CORE_MANAGER_STEAM_LIST,
PARSE_ACTION, false) == 0)
count++;
#endif
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
if (show_settings)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_SETTINGS, PARSE_ACTION, false) == 0)
count++;
count++;
if ( !settings->bools.menu_content_show_settings
&& !string_is_empty(settings->paths.menu_content_show_settings_password))
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_XMB_MAIN_MENU_ENABLE_SETTINGS,
PARSE_ACTION,
false) == 0)
count++;
if ( settings->bools.kiosk_mode_enable
&& !string_is_empty(settings->paths.kiosk_mode_password))
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_MENU_DISABLE_KIOSK_MODE,
PARSE_ACTION,
false) == 0)
count++;
if (settings->bools.menu_show_information)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_INFORMATION_LIST,
PARSE_ACTION, false) == 0)
count++;
#ifdef HAVE_CONFIGFILE
if (settings->bools.menu_show_configurations)
if ( settings->bools.menu_show_configurations
&& !settings->bools.kiosk_mode_enable)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_CONFIGURATIONS_LIST,
PARSE_ACTION, false) == 0)
count++;
#endif
#ifdef HAVE_QT
if (settings->bools.desktop_menu_enable)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_SHOW_WIMP,
PARSE_ACTION,
false) == 0)
count++;
#endif
#if defined(HAVE_LIBNX)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_SWITCH_CPU_PROFILE,
PARSE_ACTION, false) == 0)
count++;
#endif
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
PARSE_ACTION, false) == 0)
count++;
#if !defined(IOS)
if (settings->bools.menu_show_restart_retroarch)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_RESTART_RETROARCH,
PARSE_ACTION, false) == 0)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_RESTART_RETROARCH,
PARSE_ACTION, false) == 0)
count++;
if (settings->bools.menu_show_quit_retroarch)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_QUIT_RETROARCH,
PARSE_ACTION, false) == 0)
count++;
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_SWITCH_GPU_PROFILE,
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(
info->list,
MENU_ENUM_LABEL_QUIT_RETROARCH,
PARSE_ACTION, false) == 0)
count++;
count++;
#endif
#if defined(HAVE_LAKKA)
if (settings->bools.menu_show_reboot)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_REBOOT,
PARSE_ACTION, false) == 0)
count++;
if (settings->bools.menu_show_shutdown)
if (MENU_DISPLAYLIST_PARSE_SETTINGS_ENUM(info->list,
MENU_ENUM_LABEL_SHUTDOWN,
PARSE_ACTION, false) == 0)
count++;
#endif
info->flags |= MD_FLAG_NEED_PUSH;
}

View File

@ -19623,29 +19623,6 @@ static bool setting_append_list(
SD_FLAG_NONE);
#endif
#if defined(HAVE_XMB) || defined(HAVE_OZONE)
if (string_is_equal(settings->arrays.menu_driver, "xmb") ||
string_is_equal(settings->arrays.menu_driver, "ozone"))
{
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_content_show_add,
MENU_ENUM_LABEL_CONTENT_SHOW_ADD,
MENU_ENUM_LABEL_VALUE_CONTENT_SHOW_ADD,
DEFAULT_MENU_CONTENT_SHOW_ADD,
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);
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
}
else
#endif
{
CONFIG_UINT(
list, list_info,
&settings->uints.menu_content_show_add_entry,
@ -19662,8 +19639,6 @@ static bool setting_append_list(
&setting_get_string_representation_uint_menu_add_content_entry_display_type;
menu_settings_list_current_add_range(list, list_info, 0, MENU_ADD_CONTENT_ENTRY_DISPLAY_LAST-1, 1, true, true);
(*list)[list_info->index - 1].ui_type = ST_UI_TYPE_UINT_COMBOBOX;
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
}
CONFIG_BOOL(
list, list_info,

View File

@ -1619,7 +1619,7 @@ enum msg_hash_enums
MENU_LABEL(CONTENT_SHOW_VIDEO),
MENU_LABEL(CONTENT_SHOW_NETPLAY),
MENU_LABEL(CONTENT_SHOW_HISTORY),
MENU_LABEL(CONTENT_SHOW_ADD),
MENU_LABEL(CONTENT_SHOW_ADD), /* Deprecated */
MENU_LABEL(CONTENT_SHOW_ADD_ENTRY),
MENU_LABEL(CONTENT_SHOW_PLAYLISTS),
MENU_LABEL(CONTENT_SHOW_EXPLORE),