diff options
| author | Scott Mansell <phiren@gmail.com> | 2015-10-02 04:00:23 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2015-10-02 04:00:23 +1300 |
| commit | 58d893e56f05d6e8a1f4b61fd40e5d98793dc874 (patch) | |
| tree | 0bc58d68011d218124594fecbdf421a4b8f853e8 /Source/Core/VideoBackends/OGL/main.cpp | |
| parent | 696d6eae099feba23c280017c5184785fc1e3076 (diff) | |
| parent | 06c6f60f5bd67d00b6a7d176b4cc3babacc04ab9 (diff) | |
Merge pull request #3075 from waddlesplash/no-regexp
FileSearch: Don't use RegExes, just do string comparisons.
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; } |
