mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Common/FileSearch: Refactor DoFileSearch
This commit is contained in:
@@ -28,12 +28,12 @@ namespace UICommon
|
||||
{
|
||||
static constexpr u32 CACHE_REVISION = 26; // Last changed in PR 10084
|
||||
|
||||
std::vector<std::string> FindAllGamePaths(const std::vector<std::string>& directories_to_scan,
|
||||
std::vector<std::string> FindAllGamePaths(std::span<const std::string_view> directories_to_scan,
|
||||
bool recursive_scan)
|
||||
{
|
||||
static const std::vector<std::string> search_extensions = {
|
||||
".gcm", ".tgc", ".bin", ".iso", ".ciso", ".gcz", ".wbfs",
|
||||
".wia", ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"};
|
||||
constexpr auto search_extensions =
|
||||
std::to_array<std::string_view>({".gcm", ".tgc", ".bin", ".iso", ".ciso", ".gcz", ".wbfs",
|
||||
".wia", ".rvz", ".nfs", ".wad", ".dol", ".elf", ".json"});
|
||||
|
||||
// TODO: We could process paths iteratively as they are found
|
||||
return Common::DoFileSearch(directories_to_scan, search_extensions, recursive_scan);
|
||||
|
||||
Reference in New Issue
Block a user