Disable grab compute on direct calls to avoid jumps in LWJGL2 versions

This commit is contained in:
ArtDev 2021-01-17 11:51:59 +03:00
parent a60f868752
commit 92676f978f
3 changed files with 6 additions and 8 deletions

View File

@ -1 +1 @@
20210116
20210117

View File

@ -278,7 +278,7 @@ JNIEXPORT void JNICALL Java_org_lwjgl_glfw_CallbackBridge_nativeSendCursorPos(JN
}
if (!isUseStackQueueCall) {
GLFW_invoke_CursorPos(showingWindow, (double) (isGrabbing ? grabCursorX : x), (double) (isGrabbing ? grabCursorY : y));
GLFW_invoke_CursorPos(showingWindow, (double) (x), (double) (y));
} else {
sendData(EVENT_TYPE_CURSOR_POS, (isGrabbing ? grabCursorX : x), (isGrabbing ? grabCursorY : y), 0, 0);
}

View File

@ -144,11 +144,9 @@ public class GLFWInputImplementation implements InputImplementation {
int acoord1=0;
int acoord2=0;
if(coord1 == -1 && coord2 == -1) {
acoord1 = mouseComparatorX;
acoord2 = mouseComparatorY;
acoord1 = mouseX;
acoord2 = mouseY;
}else{
mouseComparatorX = coord1;
mouseComparatorY = coord2;
acoord1 = coord1;
acoord2= coord2;
}