Enable playlist/add content functionality on platforms without database support

This commit is contained in:
jdgleaver 2019-12-06 10:47:45 +00:00
parent 55916a40ab
commit 3031556e73
7 changed files with 22 additions and 44 deletions

View File

@ -518,9 +518,7 @@ static bool content_show_video = true;
static bool content_show_netplay = true;
#endif
static bool content_show_history = true;
#ifdef HAVE_LIBRETRODB
static bool content_show_add = true;
#endif
static bool content_show_playlists = true;
#ifdef HAVE_XMB

View File

@ -1523,9 +1523,7 @@ static struct config_bool_setting *populate_settings_bool(settings_t *settings,
SETTING_BOOL("content_show_netplay", &settings->bools.menu_content_show_netplay, true, content_show_netplay, false);
#endif
SETTING_BOOL("content_show_history", &settings->bools.menu_content_show_history, true, content_show_history, false);
#ifdef HAVE_LIBRETRODB
SETTING_BOOL("content_show_add", &settings->bools.menu_content_show_add, true, content_show_add, false);
#endif
SETTING_BOOL("content_show_playlists", &settings->bools.menu_content_show_playlists, true, content_show_playlists, false);
SETTING_BOOL("menu_show_load_core", &settings->bools.menu_show_load_core, true, menu_show_load_core, false);
SETTING_BOOL("menu_show_load_content", &settings->bools.menu_show_load_content, true, menu_show_load_content, false);

View File

@ -198,10 +198,9 @@ static void *ozone_init(void **userdata, bool video_is_threaded)
if (settings->bools.menu_content_show_netplay)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_NETPLAY;
#endif
#ifdef HAVE_LIBRETRODB
if (settings->bools.menu_content_show_add && !settings->bools.kiosk_mode_enable)
ozone->tabs[++ozone->system_tab_end] = OZONE_SYSTEM_TAB_ADD;
#endif
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
@ -748,13 +747,12 @@ static int ozone_list_push(void *data, void *userdata,
MENU_SETTING_ACTION, 0, 0);
}
#ifdef HAVE_LIBRETRODB
menu_entries_append_enum(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);
#endif
if (settings->bools.menu_content_show_playlists)
menu_entries_append_enum(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);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",

View File

@ -3328,10 +3328,9 @@ static void *stripes_init(void **userdata, bool video_is_threaded)
if (settings->bools.menu_content_show_netplay)
stripes->tabs[++stripes->system_tab_end] = STRIPES_SYSTEM_TAB_NETPLAY;
#endif
#ifdef HAVE_LIBRETRODB
if (settings->bools.menu_content_show_add && !settings->bools.kiosk_mode_enable)
stripes->tabs[++stripes->system_tab_end] = STRIPES_SYSTEM_TAB_ADD;
#endif
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
@ -4144,16 +4143,12 @@ static int stripes_list_push(void *data, void *userdata,
MENU_SETTING_ACTION, 0, 0);
}
#ifdef HAVE_LIBRETRODB
#if 0
/* TODO/FIXME - figure out what to do here */
menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_CONTENT_COLLECTION_LIST),
msg_hash_to_str(MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST),
MENU_ENUM_LABEL_CONTENT_COLLECTION_LIST,
MENU_SETTING_ACTION, 0, 0);
#endif
#endif
if (settings->bools.menu_content_show_playlists)
menu_entries_append_enum(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);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",

View File

@ -4782,10 +4782,9 @@ static void *xmb_init(void **userdata, bool video_is_threaded)
if (settings->bools.menu_content_show_netplay)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_NETPLAY;
#endif
#ifdef HAVE_LIBRETRODB
if (settings->bools.menu_content_show_add && !settings->bools.kiosk_mode_enable)
xmb->tabs[++xmb->system_tab_end] = XMB_SYSTEM_TAB_ADD;
#endif
menu_driver_ctl(RARCH_MENU_CTL_UNSET_PREVENT_POPULATE, NULL);
@ -5843,13 +5842,12 @@ static int xmb_list_push(void *data, void *userdata,
MENU_SETTING_ACTION, 0, 0);
}
#ifdef HAVE_LIBRETRODB
menu_entries_append_enum(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);
#endif
if (settings->bools.menu_content_show_playlists)
menu_entries_append_enum(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);
if (frontend_driver_parse_drive_list(info->list, true) != 0)
menu_entries_append_enum(info->list, "/",

View File

@ -4606,20 +4606,16 @@ unsigned menu_displaylist_build_list(file_list_t *list, enum menu_displaylist_ct
}
}
#ifndef HAVE_LIBRETRODB
{
settings_t *settings = config_get_ptr();
if (settings->bools.menu_show_advanced_settings)
#endif
if (settings->bools.menu_content_show_playlists)
if (menu_entries_append_enum(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))
count++;
#ifndef HAVE_LIBRETRODB
}
#endif
if (frontend_driver_parse_drive_list(list, true) != 0)
if (menu_entries_append_enum(list, "/",
@ -8688,9 +8684,6 @@ bool menu_displaylist_ctl(enum menu_displaylist_ctl_state type,
}
if (string_is_equal(settings->arrays.menu_driver, "rgui") &&
#ifndef HAVE_LIBRETRODB
settings->bools.menu_show_advanced_settings &&
#endif
settings->bools.menu_content_show_playlists)
if (menu_entries_append_enum(info->list,
msg_hash_to_str(MENU_ENUM_LABEL_VALUE_PLAYLISTS_TAB),

View File

@ -13133,7 +13133,6 @@ static bool setting_append_list(
SD_FLAG_NONE);
#endif
#ifdef HAVE_LIBRETRODB
CONFIG_BOOL(
list, list_info,
&settings->bools.menu_content_show_add,
@ -13149,7 +13148,6 @@ static bool setting_append_list(
general_read_handler,
SD_FLAG_NONE);
SETTINGS_DATA_LIST_CURRENT_ADD_FLAGS(list, list_info, SD_FLAG_LAKKA_ADVANCED);
#endif
CONFIG_BOOL(
list, list_info,