mirror of
https://github.com/libretro/RetroArch
synced 2025-03-02 19:13:34 +00:00
Reduce calls to menu_common_type_is
This commit is contained in:
parent
32944aac12
commit
ffc6b2f6c3
@ -266,6 +266,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
||||
#endif
|
||||
|
||||
bool path_is_compressed = path_is_compressed_file(dir);
|
||||
bool push_dir = menu_common_type_is(label, type) == MENU_FILE_DIRECTORY;
|
||||
|
||||
if (path_is_compressed)
|
||||
str_list = compressed_file_list_new(dir,exts);
|
||||
@ -277,7 +278,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
||||
|
||||
dir_list_sort(str_list, true);
|
||||
|
||||
if (menu_common_type_is(label, type) == MENU_FILE_DIRECTORY)
|
||||
if (push_dir)
|
||||
file_list_push(list, "<Use this directory>", "",
|
||||
MENU_FILE_USE_DIRECTORY, 0);
|
||||
|
||||
@ -314,7 +315,7 @@ int menu_entries_parse_list(file_list_t *list, file_list_t *menu_list,
|
||||
}
|
||||
bool is_dir = (file_type == MENU_FILE_DIRECTORY);
|
||||
|
||||
if ((menu_common_type_is(label, type) == MENU_FILE_DIRECTORY) && !is_dir)
|
||||
if (push_dir && !is_dir)
|
||||
continue;
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user