mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-11 05:35:45 -04:00
[Renderer/MG](fix): Actually load ANGLE properly
Thank you @Tungstend (again) for the tip (and code, sorry) Co-authored-by: Tungstend <hanjinlong197@gmail.com>
This commit is contained in:
parent
d9daf405b7
commit
261db7a0a8
@ -4,6 +4,7 @@
|
||||
#include <stddef.h>
|
||||
#include <stdlib.h>
|
||||
#include <dlfcn.h>
|
||||
#include <string.h>
|
||||
#include "egl_loader.h"
|
||||
#include "loader_dlopen.h"
|
||||
|
||||
@ -32,7 +33,9 @@ EGLBoolean (*eglQuerySurface_p)( EGLDisplay display,
|
||||
__eglMustCastToProperFunctionPointerType (*eglGetProcAddress_p) (const char *procname);
|
||||
|
||||
bool dlsym_EGL() {
|
||||
void* dl_handle = loader_dlopen(getenv("POJAVEXEC_EGL"),"libEGL.so", RTLD_LOCAL|RTLD_LAZY);
|
||||
char* gles = getenv("LIBGL_GLES");
|
||||
char* eglName = (strncmp(gles ? gles : "", "libGLESv2_angle.so", 18) == 0) ? "libEGL_angle.so" : getenv("POJAVEXEC_EGL");
|
||||
void* dl_handle = loader_dlopen(eglName,"libEGL.so", RTLD_LOCAL|RTLD_LAZY);
|
||||
if(dl_handle == NULL) return false;
|
||||
eglGetProcAddress_p = dlsym(dl_handle, "eglGetProcAddress");
|
||||
if(eglGetProcAddress_p == NULL) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user