From 7b0a1ca0e79805e51ec1f92743c4f496a16b0140 Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Mon, 1 Aug 2022 15:16:11 +0200 Subject: [PATCH] Fixed cursor position stuff slightly. --- .../src/main/java/nl/andrewl/aos2_client/util/WindowUtils.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/client/src/main/java/nl/andrewl/aos2_client/util/WindowUtils.java b/client/src/main/java/nl/andrewl/aos2_client/util/WindowUtils.java index 8d45af3..9655360 100644 --- a/client/src/main/java/nl/andrewl/aos2_client/util/WindowUtils.java +++ b/client/src/main/java/nl/andrewl/aos2_client/util/WindowUtils.java @@ -17,6 +17,8 @@ public class WindowUtils { public static void captureCursor(long id) { glfwSetInputMode(id, GLFW_CURSOR, GLFW_CURSOR_DISABLED); + var size = WindowUtils.getSize(id); + glfwSetCursorPos(id, size.first() / 2.0, size.second() / 2.0); } public static void freeCursor(long id) {