From 0451b78e04d730b905011ef3949d944148dd1a79 Mon Sep 17 00:00:00 2001 From: ArtDev <45949002+artdeell@users.noreply.github.com> Date: Fri, 11 Dec 2020 16:59:48 +0300 Subject: [PATCH] Terminate launcher when user closes the JVM window --- app/src/main/jni/input_bridge_v3.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/src/main/jni/input_bridge_v3.c b/app/src/main/jni/input_bridge_v3.c index a0894a3d4..cbea4710f 100644 --- a/app/src/main/jni/input_bridge_v3.c +++ b/app/src/main/jni/input_bridge_v3.c @@ -139,6 +139,7 @@ void sendData(int type, int i1, int i2, int i3, int i4) { } void closeGLFWWindow() { + /* jclass glfwClazz = (*runtimeJNIEnvPtr_JRE)->FindClass(runtimeJNIEnvPtr_JRE, "org/lwjgl/glfw/GLFW"); assert(glfwClazz != NULL); jmethodID glfwMethod = (*runtimeJNIEnvPtr_JRE)->GetStaticMethodID(runtimeJNIEnvPtr_JRE, glfwMethod, "glfwSetWindowShouldClose", "(JZ)V"); @@ -149,6 +150,8 @@ void closeGLFWWindow() { glfwClazz, glfwMethod, (jlong) showingWindow, JNI_TRUE ); + */ + exit(-1); } JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeAttachThreadToOther(JNIEnv* env, jclass clazz, jboolean isAndroid, jboolean isUseStackQueueBool) {