summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp
diff options
context:
space:
mode:
authorPierre Bourdon <delroth@gmail.com>2013-09-12 02:40:17 +0200
committerPierre Bourdon <delroth@gmail.com>2013-09-14 06:08:30 +0200
commite7213ca4b16593b676031802dd353a14a77c8a60 (patch)
tree93753bce891a43dbf0edf6fe241a98cf8bcd35c0 /Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp
parent6bdb6585d6174415105f335b3982fbc7e39fb560 (diff)
Overlay the user Shaders/ over the shared one to avoid copying files
Diffstat (limited to 'Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp')
-rw-r--r--Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp b/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp
index d5899038fc..c1563a74e2 100644
--- a/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp
+++ b/Source/Plugins/Plugin_VideoOGL/Src/PostProcessing.cpp
@@ -2,6 +2,7 @@
// Licensed under GPLv2
// Refer to the license.txt file included.
+#include "CommonPaths.h"
#include "FileUtil.h"
#include "VideoCommon.h"
#include "VideoConfig.h"
@@ -150,7 +151,12 @@ void ApplyShader()
// loading shader code
std::string code;
- std::string path = File::GetUserPath(D_SHADERS_IDX) + g_ActiveConfig.sPostProcessingShader + ".txt";
+ std::string path = File::GetUserPath(D_SHADERS_IDX) + g_ActiveConfig.sPostProcessingShader + ".glsl";
+ if (!File::Exists(path))
+ {
+ // Fallback to shared user dir
+ path = File::GetSysDirectory() + SHADERS_DIR DIR_SEP + g_ActiveConfig.sPostProcessingShader + ".glsl";
+ }
if(!File::ReadFileToString(true, path.c_str(), code)) {
ERROR_LOG(VIDEO, "Post-processing shader not found: %s", path.c_str());
return;