From a225426510fc25316b3868e8764893dff284e77e Mon Sep 17 00:00:00 2001 From: comex Date: Sat, 15 Nov 2014 15:46:40 -0500 Subject: Rewrite FileSearch and improve ScanDirectoryTree. - FileSearch is now just one function, and it converts the original glob into a regex on all platforms rather than relying on native Windows pattern matching on there and a complete hack elsewhere. It now supports recursion out of the box rather than manually expanding into a full list of directories in multiple call sites. - This adds a GCC >= 4.9 dependency due to older versions having outright broken . MSVC is fine with it. - ScanDirectoryTree returns the parent entry rather than filling parts of it in via reference. The count is now stored in the entry like it was for subdirectories. - .glsl file search is now done with DoFileSearch. - IOCTLV_READ_DIR now uses ScanDirectoryTree directly and sorts the results after replacements for better determinism. --- Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp') diff --git a/Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp b/Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp index 935ea03fee..a57774a8cd 100644 --- a/Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp +++ b/Source/Core/DolphinWX/Config/InterfaceConfigPane.cpp @@ -162,12 +162,10 @@ void InterfaceConfigPane::LoadGUIValues() void InterfaceConfigPane::LoadThemes() { - CFileSearch::XStringVector theme_dirs; - theme_dirs.push_back(File::GetUserPath(D_THEMES_IDX)); - theme_dirs.push_back(File::GetSysDirectory() + THEMES_DIR); - - CFileSearch cfs(CFileSearch::XStringVector(1, "*"), theme_dirs); - auto const& sv = cfs.GetFileNames(); + auto sv = DoFileSearch({"*"}, { + File::GetUserPath(D_THEMES_IDX), + File::GetSysDirectory() + THEMES_DIR + }, /*recursive*/ false); for (const std::string& filename : sv) { std::string name, ext; -- cgit v1.2.3