diff options
Diffstat (limited to 'Source/Core/VideoBackends/OGL/main.cpp')
| -rw-r--r-- | Source/Core/VideoBackends/OGL/main.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Source/Core/VideoBackends/OGL/main.cpp b/Source/Core/VideoBackends/OGL/main.cpp index 3a1425b5c4..95504448ba 100644 --- a/Source/Core/VideoBackends/OGL/main.cpp +++ b/Source/Core/VideoBackends/OGL/main.cpp @@ -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; } |
