Create DISPLAYLIST_OPTIONS_MANAGEMENT

This commit is contained in:
twinaphex 2015-05-13 02:14:06 +02:00
parent 7126920b29
commit b8bd20216b
3 changed files with 26 additions and 16 deletions

View File

@ -887,6 +887,17 @@ static int menu_displaylist_parse_options(menu_displaylist_info_t *info)
return 0;
}
static int menu_displaylist_parse_options_management(menu_displaylist_info_t *info)
{
#ifdef HAVE_LIBRETRODB
menu_list_push(info->list, "Database Manager", "database_manager_list",
MENU_SETTING_ACTION, 0);
menu_list_push(info->list, "Cursor Manager", "cursor_manager_list",
MENU_SETTING_ACTION, 0);
#endif
return 0;
}
int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
{
int ret = 0;
@ -931,6 +942,13 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
ret = menu_displaylist_parse_options(info);
need_push = true;
break;
case DISPLAYLIST_OPTIONS_MANAGEMENT:
menu_list_clear(info->list);
ret = menu_displaylist_parse_options_management(info);
need_push = true;
break;
case DISPLAYLIST_OPTIONS_VIDEO:

View File

@ -63,6 +63,7 @@ enum
DISPLAYLIST_SHADER_PARAMETERS,
DISPLAYLIST_SHADER_PARAMETERS_PRESET,
DISPLAYLIST_OPTIONS,
DISPLAYLIST_OPTIONS_MANAGEMENT,
DISPLAYLIST_OPTIONS_DISK,
DISPLAYLIST_OPTIONS_VIDEO,
DISPLAYLIST_OPTIONS_SHADERS,

View File

@ -1218,24 +1218,15 @@ static int deferred_push_options(void *data, void *userdata,
static int deferred_push_management_options(void *data, void *userdata,
const char *path, const char *label, unsigned type)
{
file_list_t *list = (file_list_t*)data;
file_list_t *menu_list = (file_list_t*)userdata;
menu_displaylist_info_t info = {0};
if (!list || !menu_list)
return -1;
info.list = (file_list_t*)data;
info.menu_list = (file_list_t*)userdata;
info.type = type;
strlcpy(info.path, path, sizeof(info.path));
strlcpy(info.label, label, sizeof(info.label));
menu_list_clear(list);
#ifdef HAVE_LIBRETRODB
menu_list_push(list, "Database Manager", "database_manager_list",
MENU_SETTING_ACTION, 0);
menu_list_push(list, "Cursor Manager", "cursor_manager_list",
MENU_SETTING_ACTION, 0);
#endif
menu_driver_populate_entries(path, label, type);
return 0;
return menu_displaylist_push_list(&info, DISPLAYLIST_OPTIONS_MANAGEMENT);
}
static int deferred_push_core_counters(void *data, void *userdata,