Fixed cursor position stuff slightly.

This commit is contained in:
Andrew Lalis 2022-08-01 15:16:11 +02:00
parent 606d0ea674
commit 7b0a1ca0e7
1 changed files with 2 additions and 0 deletions

View File

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