Try to fix cursor pos not correctly
This commit is contained in:
1 parent
d6c2319171
commit
41caff9de4
2 files changed
+4
-11
No files matched your search
@@ -49,8 +49,8 @@ public class CallbackBridge {
|
||||
|
||||
private static void nativeSendCursorPos(int x, int y) {
|
||||
if (!inputReady) return;
|
||||
GLFW.mGLFWCursorX = x;
|
||||
GLFW.mGLFWCursorY = y;
|
||||
GLFW.mGLFWCursorX = x + GLFW.internalGetWindow(window).x;
|
||||
GLFW.mGLFWCursorY = y + GLFW.internalGetWindow(window).y;
|
||||
}
|
||||
private static void nativeSendKeycode(int keycode, char keychar, int scancode, int action, int mods) {
|
||||
if (!inputReady) return;
|
||||
|
||||
@@ -1000,15 +1000,8 @@ public class GLFW
|
||||
}
|
||||
|
||||
public static void glfwSetWindowPos(long window, int x, int y) {
|
||||
// internalGetWindow(window).x = x;
|
||||
// internalGetWindow(window).y = y;
|
||||
|
||||
internalGetWindow(window).x = 0;
|
||||
internalGetWindow(window).y = 0;
|
||||
|
||||
if (x != 0 || y != 0) {
|
||||
mGLFWWindowPosCallback.invoke(window, 0, 0);
|
||||
}
|
||||
internalGetWindow(window).x = x;
|
||||
internalGetWindow(window).y = y;
|
||||
}
|
||||
|
||||
public static void glfwSetWindowSize(long window, int width, int height) {
|
||||
|
||||
Reference in new issue
Block a user