mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
Merge pull request #3075 from waddlesplash/no-regexp
FileSearch: Don't use RegExes, just do string comparisons.
This commit is contained in:
@ -38,7 +38,6 @@ Make AA apply instantly during gameplay if possible
|
||||
|
||||
#include <algorithm>
|
||||
#include <cstdarg>
|
||||
#include <regex>
|
||||
|
||||
#include "Common/Atomic.h"
|
||||
#include "Common/CommonPaths.h"
|
||||
@ -105,13 +104,17 @@ std::string VideoBackend::GetDisplayName() const
|
||||
|
||||
static std::vector<std::string> GetShaders(const std::string &sub_dir = "")
|
||||
{
|
||||
std::vector<std::string> paths = DoFileSearch({"*.glsl"}, {
|
||||
std::vector<std::string> paths = DoFileSearch({".glsl"}, {
|
||||
File::GetUserPath(D_SHADERS_IDX) + sub_dir,
|
||||
File::GetSysDirectory() + SHADERS_DIR DIR_SEP + sub_dir
|
||||
});
|
||||
std::vector<std::string> result;
|
||||
for (std::string path : paths)
|
||||
result.push_back(std::regex_replace(path, std::regex("^.*/(.*)\\.glsl$"), "$1"));
|
||||
{
|
||||
std::string name;
|
||||
SplitPath(path, nullptr, &name, nullptr);
|
||||
result.push_back(name);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user