From 94f1423653973ddd28f340f7b27cc30991ffb7bd Mon Sep 17 00:00:00 2001 From: khanhduytran0 Date: Fri, 11 Dec 2020 05:31:55 +0700 Subject: [PATCH] [Input pipe] Try to fix camera pos "teleported" on 1.12.2 and below --- app/src/main/jni/input_bridge_v3.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/src/main/jni/input_bridge_v3.c b/app/src/main/jni/input_bridge_v3.c index cb8b180d9..679514637 100644 --- a/app/src/main/jni/input_bridge_v3.c +++ b/app/src/main/jni/input_bridge_v3.c @@ -186,8 +186,12 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSetGrabbing(JNIE isGrabbing = grabbing; if (isGrabbing == JNI_TRUE) { // Center the cursor pointer - grabCursorX = savedWidth / 2; - grabCursorY = savedHeight / 2; + if (isUseStackQueueCall) { + grabCursorX = savedWidth / 2; + grabCursorY = savedHeight / 2; + } else { + grabCursorX = grabCursorY = 0; + } isPrepareGrabPos = true; } }