mirror of
https://github.com/libretro/RetroArch
synced 2025-04-07 13:23:32 +00:00
(menu_setting.c) Cleanups
This commit is contained in:
parent
a1225c570f
commit
4ba6dcd69b
@ -7420,6 +7420,8 @@ static bool menu_setting_free(void *data)
|
|||||||
|
|
||||||
static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_info)
|
static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_info)
|
||||||
{
|
{
|
||||||
|
unsigned i;
|
||||||
|
enum settings_list_type list_types[3];
|
||||||
rarch_setting_t* resized_list = NULL;
|
rarch_setting_t* resized_list = NULL;
|
||||||
rarch_setting_t terminator = { ST_NONE };
|
rarch_setting_t terminator = { ST_NONE };
|
||||||
const char *root = menu_hash_to_str(MENU_VALUE_MAIN_MENU);
|
const char *root = menu_hash_to_str(MENU_VALUE_MAIN_MENU);
|
||||||
@ -7427,14 +7429,15 @@ static rarch_setting_t *menu_setting_new_internal(rarch_setting_info_t *list_inf
|
|||||||
if (!list)
|
if (!list)
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
if (!setting_append_list(SETTINGS_LIST_MAIN_MENU, &list, list_info, root))
|
list_types[0] = SETTINGS_LIST_MAIN_MENU;
|
||||||
goto error;
|
list_types[1] = SETTINGS_LIST_DRIVERS;
|
||||||
|
list_types[2] = SETTINGS_LIST_CORE;
|
||||||
|
|
||||||
if (!setting_append_list(SETTINGS_LIST_DRIVERS, &list, list_info, root))
|
for (i = 0; i < 3; i++)
|
||||||
goto error;
|
{
|
||||||
|
if (!setting_append_list(list_types[i], &list, list_info, root))
|
||||||
if (!setting_append_list(SETTINGS_LIST_CORE, &list, list_info, root))
|
goto error;
|
||||||
goto error;
|
}
|
||||||
|
|
||||||
if (!setting_append_list_configuration_options(&list, list_info, root))
|
if (!setting_append_list_configuration_options(&list, list_info, root))
|
||||||
goto error;
|
goto error;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user