Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Main Menu unifications between drivers #17517

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions config.def.h
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
1 change: 0 additions & 1 deletion configuration.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
29 changes: 21 additions & 8 deletions menu/drivers/materialui.c
Original file line number Diff line number Diff line change
Expand Up @@ -9594,40 +9594,44 @@ 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, "/",
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);

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;
Expand Down Expand Up @@ -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(
Expand Down
Loading
Loading