Limit shaderlog writing behind log_programs setting

This commit is contained in:
msuih 2019-05-31 17:41:33 +03:00 committed by Ivan
parent f2cac26154
commit ef587d4cdc
5 changed files with 12 additions and 7 deletions

View file

@ -358,7 +358,8 @@ void GLVertexProgram::Compile()
const char* str = shader.c_str();
const int strlen = ::narrow<int>(shader.length());
fs::file(fs::get_cache_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
if (g_cfg.video.log_programs)
fs::file(fs::get_cache_dir() + "shaderlog/VertexProgram" + std::to_string(id) + ".glsl", fs::rewrite).write(str);
glShaderSource(id, 1, &str, &strlen);
glCompileShader(id);