mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-29 12:19:12 +00:00
Overlay the user Shaders/ over the shared one to avoid copying files
This commit is contained in:
parent
6bdb6585d6
commit
e7213ca4b1
46 changed files with 41 additions and 23 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue