OPENGL: Skip adding suffix 'shaders' for iOS app, it has flatten tree.

This commit is contained in:
Paweł Kołodziejski 2022-03-06 09:00:21 +01:00
parent d4117f3887
commit 786800e831
No known key found for this signature in database
GPG key ID: 0BDADC9E74440FF7

View file

@ -66,6 +66,7 @@ static const char *compatFragment =
static const GLchar *readFile(const Common::String &filename) {
Common::File file;
Common::String shaderDir;
// Allow load shaders from source code directory without install them.
// It's used for development purpose.
@ -79,7 +80,10 @@ static const GLchar *readFile(const Common::String &filename) {
if (ConfMan.hasKey("extrapath")) {
SearchMan.addDirectory("EXTRA_PATH", Common::FSNode(ConfMan.get("extrapath")), 0, 2);
}
file.open(Common::String("shaders/") + filename);
#if !defined(IPHONE)
shaderDir = "shaders/";
#endif
file.open(shaderDir + filename);
if (!file.isOpen())
error("Could not open shader %s!", filename.c_str());
SearchMan.remove("GRIM_SHADERS");