From 2512c1850649df59550b629577cb80abea00685b Mon Sep 17 00:00:00 2001 From: BZLZHH Date: Sat, 1 Mar 2025 12:26:07 +0800 Subject: [PATCH] [Improvement] (settings.cpp): Change the logic of loading maxGlslCacheSize config, fixing a plugin error. Signed-off-by: BZLZHH --- src/main/cpp/config/settings.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/cpp/config/settings.cpp b/src/main/cpp/config/settings.cpp index a248e17..71f5493 100644 --- a/src/main/cpp/config/settings.cpp +++ b/src/main/cpp/config/settings.cpp @@ -25,7 +25,9 @@ void init_settings() { int enableNoError = success ? config_get_int("enableNoError") : 0; int enableExtGL43 = success ? config_get_int("enableExtGL43") : 0; int enableExtComputeShader = success ? config_get_int("enableExtComputeShader") : 0; - int maxGlslCacheSize = success ? config_get_int("maxGlslCacheSize") * 1024 * 1024 : 0; + size_t maxGlslCacheSize = 0; + if (config_get_int("maxGlslCacheSize") > 0) + maxGlslCacheSize = success ? config_get_int("maxGlslCacheSize") * 1024 * 1024 : 0; if (enableANGLE < 0 || enableANGLE > 3) enableANGLE = 0;