diff options
| author | Linnea Gräf <nea@nea.moe> | 2025-09-06 00:33:46 +0200 |
|---|---|---|
| committer | Linnea Gräf <nea@nea.moe> | 2025-09-06 00:33:46 +0200 |
| commit | afc908fded2e35aad069cb1257072c263418f416 (patch) | |
| tree | 640a792a14d17c4b279a037d339771ad57b49581 /src/main/kotlin | |
| parent | 1b782da51a4dc7c2d52a317e31c8bcb9ddfbbdbe (diff) | |
| download | Firmament-afc908fded2e35aad069cb1257072c263418f416.tar.gz Firmament-afc908fded2e35aad069cb1257072c263418f416.tar.bz2 Firmament-afc908fded2e35aad069cb1257072c263418f416.zip | |
fix: potentially fix mouse grabbing incompatibility with save cursor position
Diffstat (limited to 'src/main/kotlin')
| -rw-r--r-- | src/main/kotlin/features/inventory/SaveCursorPosition.kt | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/main/kotlin/features/inventory/SaveCursorPosition.kt b/src/main/kotlin/features/inventory/SaveCursorPosition.kt index d2e9241..bbd216c 100644 --- a/src/main/kotlin/features/inventory/SaveCursorPosition.kt +++ b/src/main/kotlin/features/inventory/SaveCursorPosition.kt @@ -2,6 +2,7 @@ package moe.nea.firmament.features.inventory +import org.lwjgl.glfw.GLFW import kotlin.math.absoluteValue import kotlin.time.Duration.Companion.milliseconds import net.minecraft.client.util.InputUtil @@ -46,13 +47,7 @@ object SaveCursorPosition : FirmamentFeature { (lastPosition.middle.first - middleX).absoluteValue < 1 && (lastPosition.middle.second - middleY).absoluteValue < 1 ) { - // TODO: GLFW.glfwSetCursorPos(handler, x, y); - InputUtil.setCursorParameters( - MC.window.handle, - InputUtil.GLFW_CURSOR_NORMAL, - lastPosition.cursor.first, - lastPosition.cursor.second - ) + GLFW.glfwSetCursorPos(MC.window.handle, lastPosition.cursor.first, lastPosition.cursor.second); return lastPosition.cursor } return null |
