mirror of
https://github.com/libretro/RetroArch
synced 2025-03-28 19:20:35 +00:00
cleanup filebrowser too
This commit is contained in:
parent
45228d0307
commit
7a36190a0e
@ -74,6 +74,16 @@ void filebrowser_parse(menu_displaylist_info_t *info, unsigned type_data)
|
||||
bool filter_ext =
|
||||
settings->bools.menu_navigation_browser_filter_supported_extensions_enable;
|
||||
|
||||
rarch_system_info_t *system = runloop_get_system_info();
|
||||
const struct retro_subsystem_info *subsystem;
|
||||
|
||||
/* Core fully loaded, use the subsystem data */
|
||||
if (system->subsystem.data)
|
||||
subsystem = system->subsystem.data + content_get_subsystem();
|
||||
/* Core not loaded completely, use the data we peeked on load core */
|
||||
else
|
||||
subsystem = subsystem_data + content_get_subsystem();
|
||||
|
||||
if (info && string_is_equal(info->label,
|
||||
msg_hash_to_str(MENU_ENUM_LABEL_SCAN_FILE)))
|
||||
filter_ext = false;
|
||||
@ -82,21 +92,14 @@ void filebrowser_parse(menu_displaylist_info_t *info, unsigned type_data)
|
||||
{
|
||||
if (filebrowser_types != FILEBROWSER_SELECT_FILE_SUBSYSTEM)
|
||||
str_list = file_archive_get_file_list(path, info->exts);
|
||||
else
|
||||
{
|
||||
const struct retro_subsystem_info *subsystem = &subsystem_data[content_get_subsystem()];
|
||||
|
||||
if (subsystem_current_count > 0)
|
||||
str_list = file_archive_get_file_list(path, subsystem->roms[content_get_subsystem_rom_id()].valid_extensions);
|
||||
}
|
||||
else if (subsystem && subsystem_current_count > 0)
|
||||
str_list = file_archive_get_file_list(path, subsystem->roms[content_get_subsystem_rom_id()].valid_extensions);
|
||||
}
|
||||
else if (!string_is_empty(path))
|
||||
{
|
||||
if (filebrowser_types == FILEBROWSER_SELECT_FILE_SUBSYSTEM)
|
||||
{
|
||||
const struct retro_subsystem_info *subsystem = &subsystem_data[content_get_subsystem()];
|
||||
|
||||
if (subsystem_current_count > 0 && content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
if (subsystem && subsystem_current_count > 0 && content_get_subsystem_rom_id() < subsystem->num_roms)
|
||||
str_list = dir_list_new(path,
|
||||
(filter_ext && info) ? subsystem->roms[content_get_subsystem_rom_id()].valid_extensions : NULL,
|
||||
true, settings->bools.show_hidden_files, true, false);
|
||||
|
Loading…
x
Reference in New Issue
Block a user