Skip to content
This repository was archived by the owner on Sep 23, 2025. It is now read-only.

Commit 261db7a

Browse files
alexytomiTungstend
andcommitted
[Renderer/MG](fix): Actually load ANGLE properly
Thank you @Tungstend (again) for the tip (and code, sorry) Co-authored-by: Tungstend <[email protected]>
1 parent d9daf40 commit 261db7a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

app_pojavlauncher/src/main/jni/ctxbridges/egl_loader.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include <stddef.h>
55
#include <stdlib.h>
66
#include <dlfcn.h>
7+
#include <string.h>
78
#include "egl_loader.h"
89
#include "loader_dlopen.h"
910

@@ -32,7 +33,9 @@ EGLBoolean (*eglQuerySurface_p)( EGLDisplay display,
3233
__eglMustCastToProperFunctionPointerType (*eglGetProcAddress_p) (const char *procname);
3334

3435
bool dlsym_EGL() {
35-
void* dl_handle = loader_dlopen(getenv("POJAVEXEC_EGL"),"libEGL.so", RTLD_LOCAL|RTLD_LAZY);
36+
char* gles = getenv("LIBGL_GLES");
37+
char* eglName = (strncmp(gles ? gles : "", "libGLESv2_angle.so", 18) == 0) ? "libEGL_angle.so" : getenv("POJAVEXEC_EGL");
38+
void* dl_handle = loader_dlopen(eglName,"libEGL.so", RTLD_LOCAL|RTLD_LAZY);
3639
if(dl_handle == NULL) return false;
3740
eglGetProcAddress_p = dlsym(dl_handle, "eglGetProcAddress");
3841
if(eglGetProcAddress_p == NULL) {

0 commit comments

Comments
 (0)