mirror of
https://github.com/libretro/RetroArch
synced 2025-03-03 04:14:00 +00:00
Collapse subgroups automatically enabled now
This commit is contained in:
parent
57edd31fdf
commit
b2b78125fa
@ -497,7 +497,6 @@ static const bool overlay_hide_in_menu = true;
|
||||
#ifdef HAVE_MENU
|
||||
static bool default_block_config_read = true;
|
||||
|
||||
static bool collapse_subgroups_enable = true;
|
||||
static bool show_advanced_settings = true;
|
||||
static const uint32_t menu_entry_normal_color = 0xffffffff;
|
||||
static const uint32_t menu_entry_hover_color = 0xff64ff64;
|
||||
|
@ -573,7 +573,6 @@ static void config_set_defaults(void)
|
||||
settings->menu.dynamic_wallpaper_enable = false;
|
||||
settings->menu.boxart_enable = false;
|
||||
*settings->menu.wallpaper = '\0';
|
||||
settings->menu.collapse_subgroups_enable = collapse_subgroups_enable;
|
||||
settings->menu.show_advanced_settings = show_advanced_settings;
|
||||
settings->menu.entry_normal_color = menu_entry_normal_color;
|
||||
settings->menu.entry_hover_color = menu_entry_hover_color;
|
||||
@ -1287,8 +1286,6 @@ static bool config_load_file(const char *path, bool set_defaults)
|
||||
CONFIG_GET_BOOL_BASE(conf, settings,
|
||||
menu.navigation.browser.filter.supported_extensions_enable,
|
||||
"menu_navigation_browser_filter_supported_extensions_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.collapse_subgroups_enable,
|
||||
"menu_collapse_subgroups_enable");
|
||||
CONFIG_GET_BOOL_BASE(conf, settings, menu.show_advanced_settings,
|
||||
"menu_show_advanced_settings");
|
||||
CONFIG_GET_HEX_BASE(conf, settings, menu.entry_normal_color,
|
||||
@ -2644,8 +2641,6 @@ bool config_save_file(const char *path)
|
||||
config_set_bool(conf,
|
||||
"menu_navigation_browser_filter_supported_extensions_enable",
|
||||
settings->menu.navigation.browser.filter.supported_extensions_enable);
|
||||
config_set_bool(conf, "menu_collapse_subgroups_enable",
|
||||
settings->menu.collapse_subgroups_enable);
|
||||
config_set_bool(conf, "menu_show_advanced_settings",
|
||||
settings->menu.show_advanced_settings);
|
||||
config_set_hex(conf, "menu_entry_normal_color",
|
||||
|
@ -151,7 +151,6 @@ typedef struct settings
|
||||
unsigned override_value;
|
||||
} dpi;
|
||||
|
||||
bool collapse_subgroups_enable;
|
||||
bool show_advanced_settings;
|
||||
#ifdef HAVE_THREADS
|
||||
bool threaded_data_runloop_enable;
|
||||
|
@ -172,11 +172,6 @@ static int deferred_push_settings(menu_displaylist_info_t *info)
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_SETTINGS_ALL);
|
||||
}
|
||||
|
||||
static int deferred_push_settings_subgroup(menu_displaylist_info_t *info)
|
||||
{
|
||||
return menu_displaylist_push_list(info, DISPLAYLIST_SETTINGS_SUBGROUP);
|
||||
}
|
||||
|
||||
static int deferred_push_category(menu_displaylist_info_t *info)
|
||||
{
|
||||
|
||||
@ -770,21 +765,6 @@ int menu_cbs_init_bind_deferred_push(menu_file_list_cbs_t *cbs,
|
||||
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_default);
|
||||
|
||||
if (cbs->setting)
|
||||
{
|
||||
const char *parent_group = menu_setting_get_parent_group(cbs->setting);
|
||||
uint32_t parent_group_hash = menu_hash_calculate(parent_group);
|
||||
|
||||
if ((parent_group_hash == MENU_VALUE_MAIN_MENU) && menu_setting_get_type(cbs->setting) == ST_GROUP)
|
||||
{
|
||||
if (!settings->menu.collapse_subgroups_enable)
|
||||
{
|
||||
BIND_ACTION_DEFERRED_PUSH(cbs, deferred_push_settings_subgroup);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (menu_cbs_init_bind_deferred_push_compare_label(cbs, label, label_hash) == 0)
|
||||
return 0;
|
||||
|
||||
|
@ -2400,57 +2400,18 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
setting = menu_setting_find(menu_hash_to_str(MENU_LABEL_VALUE_DRIVER_SETTINGS));
|
||||
flags = menu_setting_get_flags(setting);
|
||||
|
||||
if (settings->menu.collapse_subgroups_enable)
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
||||
{
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
||||
const char *short_description = menu_setting_get_short_description(setting);
|
||||
const char *name = menu_setting_get_name(setting);
|
||||
|
||||
if (menu_setting_get_type(setting) == ST_GROUP)
|
||||
{
|
||||
const char *short_description = menu_setting_get_short_description(setting);
|
||||
const char *name = menu_setting_get_name(setting);
|
||||
|
||||
if (menu_setting_get_type(setting) == ST_GROUP)
|
||||
{
|
||||
if (flags & SD_FLAG_ADVANCED &&
|
||||
!settings->menu.show_advanced_settings)
|
||||
continue;
|
||||
menu_entries_push(info->list, short_description,
|
||||
name, menu_setting_set_flags(setting), 0, 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
||||
{
|
||||
char group_label[PATH_MAX_LENGTH];
|
||||
const char *short_description = menu_setting_get_short_description(setting);
|
||||
const char *name = menu_setting_get_name(setting);
|
||||
|
||||
switch (menu_setting_get_type(setting))
|
||||
{
|
||||
case ST_GROUP:
|
||||
strlcpy(group_label, name, sizeof(group_label));
|
||||
break;
|
||||
case ST_SUB_GROUP:
|
||||
{
|
||||
char subgroup_label[PATH_MAX_LENGTH];
|
||||
char new_label[PATH_MAX_LENGTH], new_path[PATH_MAX_LENGTH];
|
||||
|
||||
strlcpy(subgroup_label, name, sizeof(group_label));
|
||||
strlcpy(new_label, group_label, sizeof(new_label));
|
||||
strlcat(new_label, "|", sizeof(new_label));
|
||||
strlcat(new_label, subgroup_label, sizeof(new_label));
|
||||
|
||||
strlcpy(new_path, group_label, sizeof(new_path));
|
||||
strlcat(new_path, " - ", sizeof(new_path));
|
||||
strlcat(new_path, short_description, sizeof(new_path));
|
||||
|
||||
menu_entries_push(info->list, new_path,
|
||||
new_label, MENU_SETTING_SUBGROUP, 0, 0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (flags & SD_FLAG_ADVANCED &&
|
||||
!settings->menu.show_advanced_settings)
|
||||
continue;
|
||||
menu_entries_push(info->list, short_description,
|
||||
name, menu_setting_set_flags(setting), 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user