summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends/OGL/main.cpp
diff options
context:
space:
mode:
authorScott Mansell <phiren@gmail.com>2015-10-02 04:00:23 +1300
committerScott Mansell <phiren@gmail.com>2015-10-02 04:00:23 +1300
commit58d893e56f05d6e8a1f4b61fd40e5d98793dc874 (patch)
tree0bc58d68011d218124594fecbdf421a4b8f853e8 /Source/Core/VideoBackends/OGL/main.cpp
parent696d6eae099feba23c280017c5184785fc1e3076 (diff)
parent06c6f60f5bd67d00b6a7d176b4cc3babacc04ab9 (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.cpp9
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;
}