From 269c2b3cb451fddcd3d6dd1aeb93818af3bbf2d3 Mon Sep 17 00:00:00 2001 From: artdeell Date: Sun, 19 Jan 2025 23:13:00 +0300 Subject: [PATCH] Fix[egl_bridge]: remove attachEnvs() --- app_pojavlauncher/src/main/jni/egl_bridge.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app_pojavlauncher/src/main/jni/egl_bridge.c b/app_pojavlauncher/src/main/jni/egl_bridge.c index 38923dfc7d..1b37f6bdbb 100644 --- a/app_pojavlauncher/src/main/jni/egl_bridge.c +++ b/app_pojavlauncher/src/main/jni/egl_bridge.c @@ -214,16 +214,12 @@ int pojavInitOpenGL() { extern void updateMonitorSize(int width, int height); -static void attachEnvs() { +EXTERNAL_API int pojavInit() { pojav_environ->glfwThreadVmEnv = get_attached_env(pojav_environ->runtimeJavaVMPtr); if(pojav_environ->glfwThreadVmEnv == NULL) { printf("Failed to attach Java-side JNIEnv to GLFW thread\n"); return 0; } -} - -EXTERNAL_API int pojavInit() { - ANativeWindow_acquire(pojav_environ->pojavWindow); pojav_environ->savedWidth = ANativeWindow_getWidth(pojav_environ->pojavWindow); pojav_environ->savedHeight = ANativeWindow_getHeight(pojav_environ->pojavWindow);