mirror of
https://github.com/libretro/RetroArch
synced 2025-01-31 06:32:48 +00:00
Finally XMB starts becoming a bit more useful - hook up database
support to Horizontal Menu
This commit is contained in:
parent
4fc37d4f25
commit
e54d1f615d
@ -155,6 +155,24 @@ int menu_entries_push_horizontal_menu_list(menu_handle_t *menu,
|
|||||||
MENU_FILE_CONTENTLIST_ENTRY,
|
MENU_FILE_CONTENTLIST_ENTRY,
|
||||||
0);
|
0);
|
||||||
|
|
||||||
|
if (info->databases_list)
|
||||||
|
{
|
||||||
|
size_t i;
|
||||||
|
char db_path[PATH_MAX_LENGTH];
|
||||||
|
|
||||||
|
for (i = 0; i < info->databases_list->size; i++)
|
||||||
|
{
|
||||||
|
struct string_list *strlist = info->databases_list;
|
||||||
|
|
||||||
|
fill_pathname_join(db_path, g_settings.content_database, strlist->elems[i].data, sizeof(db_path));
|
||||||
|
strlcat(db_path, ".rdb", sizeof(db_path));
|
||||||
|
|
||||||
|
if (path_file_exists(db_path))
|
||||||
|
menu_list_push(list, path_basename(db_path), "core_database",
|
||||||
|
MENU_FILE_RDB, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
menu_list_populate_generic(menu, list, path, label, menu_type);
|
menu_list_populate_generic(menu, list, path, label, menu_type);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -2642,7 +2642,8 @@ static int menu_entries_cbs_init_bind_ok_first(menu_file_list_cbs_t *cbs,
|
|||||||
case MENU_FILE_RDB:
|
case MENU_FILE_RDB:
|
||||||
if (!strcmp(menu_label, "deferred_database_manager_list"))
|
if (!strcmp(menu_label, "deferred_database_manager_list"))
|
||||||
cbs->action_ok = action_ok_database_manager_list_deferred;
|
cbs->action_ok = action_ok_database_manager_list_deferred;
|
||||||
else if (!strcmp(menu_label, "database_manager_list"))
|
else if (!strcmp(menu_label, "database_manager_list")
|
||||||
|
|| !strcmp(menu_label, "Horizontal Menu"))
|
||||||
cbs->action_ok = action_ok_database_manager_list;
|
cbs->action_ok = action_ok_database_manager_list;
|
||||||
else
|
else
|
||||||
return -1;
|
return -1;
|
||||||
@ -2834,11 +2835,15 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
|||||||
const char *path, const char *label, unsigned type, size_t idx)
|
const char *path, const char *label, unsigned type, size_t idx)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
const char *menu_label = NULL;
|
||||||
rarch_setting_t *setting = menu_action_find_setting(label);
|
rarch_setting_t *setting = menu_action_find_setting(label);
|
||||||
|
|
||||||
if (!cbs)
|
if (!cbs)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
menu_list_get_last_stack(driver.menu->menu_list,
|
||||||
|
NULL, &menu_label, NULL);
|
||||||
|
|
||||||
cbs->action_toggle = menu_action_setting_set;
|
cbs->action_toggle = menu_action_setting_set;
|
||||||
|
|
||||||
switch (type)
|
switch (type)
|
||||||
@ -2861,6 +2866,9 @@ static void menu_entries_cbs_init_bind_toggle(menu_file_list_cbs_t *cbs,
|
|||||||
case MENU_FILE_USE_DIRECTORY:
|
case MENU_FILE_USE_DIRECTORY:
|
||||||
case MENU_FILE_PLAYLIST_ENTRY:
|
case MENU_FILE_PLAYLIST_ENTRY:
|
||||||
case MENU_FILE_DOWNLOAD_CORE:
|
case MENU_FILE_DOWNLOAD_CORE:
|
||||||
|
if (!strcmp(menu_label, "Horizontal Menu"))
|
||||||
|
cbs->action_toggle = action_toggle_mainmenu;
|
||||||
|
else
|
||||||
cbs->action_toggle = action_toggle_scroll;
|
cbs->action_toggle = action_toggle_scroll;
|
||||||
break;
|
break;
|
||||||
case MENU_SETTING_ACTION:
|
case MENU_SETTING_ACTION:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user