mirror of
https://github.com/libretro/RetroArch.git
synced 2025-03-03 15:37:30 +00:00
menu_displaylist_parse_settings_internal_enum - optimize - if
setting is flagged as advanced and advanced settings are not enabled, then do early return
This commit is contained in:
parent
804fab61bc
commit
d1e4ada773
@ -1734,14 +1734,19 @@ static int menu_displaylist_parse_settings_internal_enum(
|
||||
{
|
||||
enum setting_type precond = ST_NONE;
|
||||
size_t count = 0;
|
||||
uint64_t flags = 0;
|
||||
settings_t *settings = config_get_ptr();
|
||||
bool show_advanced_settings = settings->bools.menu_show_advanced_settings;
|
||||
|
||||
if (!setting)
|
||||
return -1;
|
||||
|
||||
flags = setting->flags;
|
||||
{
|
||||
uint64_t flags = setting->flags;
|
||||
|
||||
if (!show_advanced_settings)
|
||||
if ((flags & SD_FLAG_ADVANCED) || (flags & SD_FLAG_LAKKA_ADVANCED))
|
||||
goto end;
|
||||
}
|
||||
|
||||
switch (parse_type)
|
||||
{
|
||||
@ -1790,6 +1795,7 @@ static int menu_displaylist_parse_settings_internal_enum(
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
for (;;)
|
||||
{
|
||||
bool time_to_exit = false;
|
||||
@ -1836,10 +1842,6 @@ static int menu_displaylist_parse_settings_internal_enum(
|
||||
goto loop;
|
||||
}
|
||||
|
||||
if (!show_advanced_settings)
|
||||
if ((flags & SD_FLAG_ADVANCED) || (flags & SD_FLAG_LAKKA_ADVANCED))
|
||||
goto loop;
|
||||
|
||||
if (is_enum)
|
||||
{
|
||||
enum msg_hash_enums enum_idx = (enum msg_hash_enums)entry_type;
|
||||
@ -1893,6 +1895,7 @@ loop:
|
||||
(*list = *list + 1);
|
||||
}
|
||||
|
||||
end:
|
||||
if (count == 0)
|
||||
{
|
||||
if (add_empty_entry)
|
||||
|
Loading…
x
Reference in New Issue
Block a user