Skip to content

Commit

Permalink
Update egl_bridge.c
Browse files Browse the repository at this point in the history
  • Loading branch information
thewiilover authored Nov 8, 2024
1 parent 4703219 commit e6ac134
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/main/jni/egl_bridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ int xrEglInit() {
if (xrEglDisplay == NULL || xrEglDisplay == EGL_NO_DISPLAY) {
xrEglDisplay = eglGetDisplay_p(EGL_DEFAULT_DISPLAY);
if (xrEglDisplay == EGL_NO_DISPLAY) {
printf("EGLBridge: Error eglGetDefaultDisplay() failed: %p\n", eglGetError_p());
printf("EGLBridge: Error eglGetDefaultDisplay() failed: %d\n", eglGetError_p());
return 0;
}
}
Expand All @@ -101,7 +101,7 @@ int xrEglInit() {
// printf("EGLBridge: ANativeWindow pointer = %p\n", androidWindow);
//(*env)->ThrowNew(env,(*env)->FindClass(env,"java/lang/Exception"),"Trace exception");
if (!eglInitialize_p(xrEglDisplay, NULL, NULL)) {
printf("EGLBridge: Error eglInitialize() failed: %s\n", eglGetError_p());
printf("EGLBridge: Error eglInitialize() failed: %d\n", eglGetError_p());
return 0;
}

Expand All @@ -121,15 +121,15 @@ int xrEglInit() {
EGLint vid;

if (!eglChooseConfig_p(xrEglDisplay, attribs, &xrConfig, 1, &num_configs)) {
printf("EGLBridge: Error couldn't get an EGL visual config: %s\n", eglGetError_p());
printf("EGLBridge: Error couldn't get an EGL visual config: %d\n", eglGetError_p());
return 0;
}

assert(xrConfig);
assert(num_configs > 0);

if (!eglGetConfigAttrib_p(xrEglDisplay, xrConfig, EGL_NATIVE_VISUAL_ID, &vid)) {
printf("EGLBridge: Error eglGetConfigAttrib() failed: %s\n", eglGetError_p());
printf("EGLBridge: Error eglGetConfigAttrib() failed: %d\n", eglGetError_p());
return 0;
}

Expand Down Expand Up @@ -185,7 +185,7 @@ void pojavMakeCurrent(void* window) {
xrEglContext = window;

if (success == EGL_FALSE) {
printf("XREGLBridge: Error: eglMakeCurrent() failed: %p\n", eglGetError());
printf("XREGLBridge: Error: eglMakeCurrent() failed: %d\n", eglGetError());
} else {
printf("XREGLBridge: eglMakeCurrent() succeed!\n");
}
Expand Down

0 comments on commit e6ac134

Please sign in to comment.