Bug fix: unable to load GL4ES 1.1.5

This commit is contained in:
khanhduytran0 2020-12-15 17:19:16 +07:00
parent 835c34fb96
commit f1ed2711ea

View File

@ -65,7 +65,7 @@ public class JREUtils
if (LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME.equals("libgl04es.so")) {
LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME = nativeLibDir + "/libgl04es.so";
}
if (!dlopen(LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME)) {
if (!dlopen(LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME) && !dlopen(findInLdLibPath(LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME))) {
System.err.println("Failed to load custom OpenGL library " + LauncherPreferences.PREF_CUSTOM_OPENGL_LIBNAME + ". Fallbacking to GL4ES.");
dlopen(nativeLibDir + "/libgl04es.so");
}