mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 00:29:50 -04:00
Terminate launcher when user closes the JVM window
This commit is contained in:
parent
c5b920d1f2
commit
0451b78e04
@ -139,6 +139,7 @@ void sendData(int type, int i1, int i2, int i3, int i4) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void closeGLFWWindow() {
|
void closeGLFWWindow() {
|
||||||
|
/*
|
||||||
jclass glfwClazz = (*runtimeJNIEnvPtr_JRE)->FindClass(runtimeJNIEnvPtr_JRE, "org/lwjgl/glfw/GLFW");
|
jclass glfwClazz = (*runtimeJNIEnvPtr_JRE)->FindClass(runtimeJNIEnvPtr_JRE, "org/lwjgl/glfw/GLFW");
|
||||||
assert(glfwClazz != NULL);
|
assert(glfwClazz != NULL);
|
||||||
jmethodID glfwMethod = (*runtimeJNIEnvPtr_JRE)->GetStaticMethodID(runtimeJNIEnvPtr_JRE, glfwMethod, "glfwSetWindowShouldClose", "(JZ)V");
|
jmethodID glfwMethod = (*runtimeJNIEnvPtr_JRE)->GetStaticMethodID(runtimeJNIEnvPtr_JRE, glfwMethod, "glfwSetWindowShouldClose", "(JZ)V");
|
||||||
@ -149,6 +150,8 @@ void closeGLFWWindow() {
|
|||||||
glfwClazz, glfwMethod,
|
glfwClazz, glfwMethod,
|
||||||
(jlong) showingWindow, JNI_TRUE
|
(jlong) showingWindow, JNI_TRUE
|
||||||
);
|
);
|
||||||
|
*/
|
||||||
|
exit(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeAttachThreadToOther(JNIEnv* env, jclass clazz, jboolean isAndroid, jboolean isUseStackQueueBool) {
|
JNIEXPORT jboolean JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeAttachThreadToOther(JNIEnv* env, jclass clazz, jboolean isAndroid, jboolean isUseStackQueueBool) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user