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) {