Added a null check 🇫🇷

The mod installer tries to set Mesa OpenGL version that depends on renderer, but it is unused.
This commit is contained in:
Duy Tran Khanh 2021-11-09 08:05:49 +07:00 committed by GitHub
parent e1c7c2c5c9
commit 3c7c0a0882
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -210,8 +210,10 @@ public class JREUtils {
envMap.put("LIBGL_NORMALIZE", "1"); envMap.put("LIBGL_NORMALIZE", "1");
envMap.put("MESA_GLSL_CACHE_DIR", ctx.getCacheDir().getAbsolutePath()); envMap.put("MESA_GLSL_CACHE_DIR", ctx.getCacheDir().getAbsolutePath());
envMap.put("MESA_GL_VERSION_OVERRIDE", LOCAL_RENDERER.equals("opengles3_virgl")?"4.5":"4.6"); if (LOCAL_RENDERER != null)
envMap.put("MESA_GLSL_VERSION_OVERRIDE", LOCAL_RENDERER.equals("opengles3_virgl")?"450":"460"); envMap.put("MESA_GL_VERSION_OVERRIDE", LOCAL_RENDERER.equals("opengles3_virgl")?"4.5":"4.6");
envMap.put("MESA_GLSL_VERSION_OVERRIDE", LOCAL_RENDERER.equals("opengles3_virgl")?"450":"460");
}
envMap.put("force_glsl_extensions_warn", "true"); envMap.put("force_glsl_extensions_warn", "true");
envMap.put("allow_higher_compat_version", "true"); envMap.put("allow_higher_compat_version", "true");
envMap.put("allow_glsl_extension_directive_midshader", "true"); envMap.put("allow_glsl_extension_directive_midshader", "true");