mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-25 00:49:47 +00:00
Create menu_settings_list_increment
This commit is contained in:
parent
146691946c
commit
260f98d227
@ -1615,7 +1615,7 @@ static int menu_displaylist_parse_settings(menu_handle_t *menu,
|
||||
return -1;
|
||||
|
||||
|
||||
for (; menu_setting_get_type(setting) != ST_END_GROUP; setting++)
|
||||
for (; menu_setting_get_type(setting) != ST_END_GROUP; menu_settings_list_increment(&setting))
|
||||
{
|
||||
const char *short_description = menu_setting_get_short_description(setting);
|
||||
const char *name = menu_setting_get_name(setting);
|
||||
@ -1689,13 +1689,12 @@ static int menu_displaylist_parse_settings_in_subgroup(menu_displaylist_info_t *
|
||||
if ((strlen(name) != 0) && !strcmp(name, elem1))
|
||||
break;
|
||||
}
|
||||
info->setting++;
|
||||
menu_settings_list_increment(&info->setting);
|
||||
}
|
||||
|
||||
menu_settings_list_increment(&info->setting);
|
||||
|
||||
info->setting++;
|
||||
|
||||
for (; menu_setting_get_type(info->setting) != ST_END_SUB_GROUP; info->setting++)
|
||||
for (; menu_setting_get_type(info->setting) != ST_END_SUB_GROUP; menu_settings_list_increment(&info->setting))
|
||||
{
|
||||
const char *name = menu_setting_get_name(info->setting);
|
||||
const char *short_description = menu_setting_get_short_description(info->setting);
|
||||
@ -2542,7 +2541,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
|
||||
if (settings->menu.collapse_subgroups_enable)
|
||||
{
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; 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);
|
||||
@ -2559,7 +2558,7 @@ int menu_displaylist_push_list(menu_displaylist_info_t *info, unsigned type)
|
||||
}
|
||||
else
|
||||
{
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; setting++)
|
||||
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);
|
||||
|
@ -64,6 +64,14 @@ static void menu_settings_info_list_free(rarch_setting_info_t *list_info)
|
||||
free(list_info);
|
||||
}
|
||||
|
||||
void menu_settings_list_increment(rarch_setting_t **list)
|
||||
{
|
||||
if (!list || !*list)
|
||||
return;
|
||||
|
||||
*list = *list + 1;
|
||||
}
|
||||
|
||||
static bool menu_settings_list_append(rarch_setting_t **list,
|
||||
rarch_setting_info_t *list_info, rarch_setting_t value)
|
||||
{
|
||||
@ -335,7 +343,7 @@ rarch_setting_t *menu_setting_find(const char *label)
|
||||
|
||||
needle = menu_hash_calculate(label);
|
||||
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; setting++)
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
||||
{
|
||||
const char *name = menu_setting_get_name(setting);
|
||||
const char *short_description = menu_setting_get_short_description(setting);
|
||||
@ -6463,7 +6471,7 @@ void menu_setting_free(rarch_setting_t *list)
|
||||
if (!list)
|
||||
return;
|
||||
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; setting++)
|
||||
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
|
||||
{
|
||||
if (flags & SD_FLAG_IS_DRIVER)
|
||||
{
|
||||
|
@ -308,6 +308,8 @@ void *setting_get_ptr(rarch_setting_t *setting);
|
||||
|
||||
bool menu_setting_action_right(rarch_setting_t *setting, bool wraparound);
|
||||
|
||||
void menu_settings_list_increment(rarch_setting_t **list);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user