Make menu_entries_push_list into static function

This commit is contained in:
twinaphex 2015-05-12 12:55:48 +02:00
parent 437db49d3e
commit 7eb92dbc9a
3 changed files with 39 additions and 44 deletions

View File

@ -315,6 +315,45 @@ static int menu_displaylist_parse(
return 0;
}
static int menu_entries_push_list(menu_handle_t *menu,
file_list_t *list,
const char *path, const char *label,
unsigned type, unsigned setting_flags)
{
rarch_setting_t *setting = NULL;
settings_t *settings = config_get_ptr();
if (menu && menu->list_settings)
settings_list_free(menu->list_settings);
menu->list_settings = (rarch_setting_t *)setting_new(setting_flags);
setting = (rarch_setting_t*)menu_setting_find(label);
if (!setting)
return -1;
menu_list_clear(list);
for (; setting->type != ST_END_GROUP; setting++)
{
if (
setting->type == ST_GROUP
|| setting->type == ST_SUB_GROUP
|| setting->type == ST_END_SUB_GROUP
|| (setting->flags & SD_FLAG_ADVANCED &&
!settings->menu.show_advanced_settings)
)
continue;
menu_list_push(list, setting->short_description,
setting->name, menu_entries_setting_set_flags(setting), 0);
}
menu_driver_populate_entries(path, label, type);
return 0;
}
int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
{
int ret = 0;

View File

@ -124,45 +124,6 @@ static int menu_entries_push_horizontal_menu_list_cores(
return 0;
}
int menu_entries_push_list(menu_handle_t *menu,
file_list_t *list,
const char *path, const char *label,
unsigned type, unsigned setting_flags)
{
rarch_setting_t *setting = NULL;
settings_t *settings = config_get_ptr();
if (menu && menu->list_settings)
settings_list_free(menu->list_settings);
menu->list_settings = (rarch_setting_t *)setting_new(setting_flags);
setting = (rarch_setting_t*)menu_setting_find(label);
if (!setting)
return -1;
menu_list_clear(list);
for (; setting->type != ST_END_GROUP; setting++)
{
if (
setting->type == ST_GROUP
|| setting->type == ST_SUB_GROUP
|| setting->type == ST_END_SUB_GROUP
|| (setting->flags & SD_FLAG_ADVANCED &&
!settings->menu.show_advanced_settings)
)
continue;
menu_list_push(list, setting->short_description,
setting->name, menu_entries_setting_set_flags(setting), 0);
}
menu_driver_populate_entries(path, label, type);
return 0;
}
int menu_entries_push_horizontal_menu_list(
menu_handle_t *menu, file_list_t *list,
const char *path, const char *label,

View File

@ -45,11 +45,6 @@ bool menu_entries_init(menu_handle_t *menu);
int menu_entries_setting_set_flags(rarch_setting_t *setting);
int menu_entries_push_list(menu_handle_t *menu,
file_list_t *list,
const char *path, const char *label,
unsigned type, unsigned setting_flags);
int menu_entries_push_horizontal_menu_list(menu_handle_t *menu,
file_list_t *list,
const char *path, const char *label,