[Scummvm-git-logs] scummvm master -> 4dcfc483e81015236933eedc36d460cc72d705bc

sev- noreply at scummvm.org
Thu Jan 5 14:30:27 UTC 2023


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4dcfc483e8 GRAPHICS: OPENGL: Do not search shaders in dev environment in release builds


Commit: 4dcfc483e81015236933eedc36d460cc72d705bc
    https://github.com/scummvm/scummvm/commit/4dcfc483e81015236933eedc36d460cc72d705bc
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-01-05T15:29:33+01:00

Commit Message:
GRAPHICS: OPENGL: Do not search shaders in dev environment in release builds

Changed paths:
    graphics/opengl/shader.cpp


diff --git a/graphics/opengl/shader.cpp b/graphics/opengl/shader.cpp
index e1031b71a80..6ece5c981f7 100644
--- a/graphics/opengl/shader.cpp
+++ b/graphics/opengl/shader.cpp
@@ -82,6 +82,7 @@ static const GLchar *readFile(const Common::String &filename) {
 	Common::File file;
 	Common::String shaderDir;
 
+#ifndef RELEASE_BUILD
 	// Allow load shaders from source code directory without install them.
 	// It's used for development purpose.
 	// Additionally allow load shaders outside distribution data path,
@@ -92,6 +93,8 @@ static const GLchar *readFile(const Common::String &filename) {
 	SearchMan.addDirectory("WINTERMUTE_SHADERS", "engines/wintermute/base/gfx/opengl", 0, 2);
 	SearchMan.addDirectory("PLAYGROUND3D_SHADERS", "engines/playground3d", 0, 2);
 	SearchMan.addDirectory("HPL1_SHADERS", "engines/hpl1/engine/impl", 0, 2);
+#endif
+
 	if (ConfMan.hasKey("extrapath")) {
 		SearchMan.addDirectory("EXTRA_PATH", Common::FSNode(ConfMan.get("extrapath")), 0, 2);
 	}
@@ -101,13 +104,17 @@ static const GLchar *readFile(const Common::String &filename) {
 	file.open(shaderDir + filename);
 	if (!file.isOpen())
 		error("Could not open shader %s!", filename.c_str());
+
+#ifndef RELEASE_BUILD
 	SearchMan.remove("GRIM_SHADERS");
 	SearchMan.remove("MYST3_SHADERS");
 	SearchMan.remove("STARK_SHADERS");
 	SearchMan.remove("WINTERMUTE_SHADERS");
 	SearchMan.remove("PLAYGROUND3D_SHADERS");
-	SearchMan.remove("EXTRA_PATH");
 	SearchMan.remove("HPL1_SHADERS");
+#endif
+
+	SearchMan.remove("EXTRA_PATH");
 
 	const int32 size = file.size();
 	GLchar *shaderSource = new GLchar[size + 1];




More information about the Scummvm-git-logs mailing list