Fix loading of texture shaders

This commit is contained in:
Henrik Rydgård committed 2022-12-03 20:37:58 +01:00
1 parent f3ba8fb334
commit 6acbd1f9e3
1 file changed
+2 -2
+2 -2
View File
@@ -50,6 +50,7 @@ void LoadPostShaderInfo(Draw::DrawContext *draw, const std::vector<Path> &direct
}
shaderInfo.clear();
textureShaderInfo.clear();
auto appendShader = [&](const ShaderInfo &info) {
auto beginErase = std::remove(shaderInfo.begin(), shaderInfo.end(), info.name);
@@ -230,11 +231,10 @@ void LoadPostShaderInfo(Draw::DrawContext *draw, const std::vector<Path> &direct
}
shaderInfo.insert(shaderInfo.begin(), off);
textureShaderInfo.clear();
TextureShaderInfo textureOff{};
textureOff.name = "Off";
textureOff.section = "Off";
textureShaderInfo.push_back(textureOff);
textureShaderInfo.insert(textureShaderInfo.begin(), textureOff);
// We always want the not visible ones at the end. Makes menus easier.
for (const auto &info : notVisible) {