From ae65fcaa7b45e2419b7749d6fdd25cce52ccd865 Mon Sep 17 00:00:00 2001 From: Andrew Belt Date: Tue, 22 Apr 2025 00:31:53 -0400 Subject: [PATCH] Increase delay in Window::cursorLock() to ignore mouse delta on Mac. --- src/window/Window.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/window/Window.cpp b/src/window/Window.cpp index 59497645..08d8d397 100644 --- a/src/window/Window.cpp +++ b/src/window/Window.cpp @@ -638,9 +638,9 @@ void Window::cursorLock() { // Due to a bug in GLFW, setting GLFW_CURSOR_DISABLED causes a spurious mouse position delta after a few frames. // https://github.com/glfw/glfw/issues/2523 - // Emperically, this seems to be up to 3-6 frames at 60 Hz but in fewer frames at lower framerates. + // Empirically, this seems to be up to 3-6 frames at 60 Hz but in fewer frames at lower framerates, so we use time units. #if defined ARCH_MAC - internal->ignoreMouseDeltaUntil = internal->frameTime + 0.09; + internal->ignoreMouseDeltaUntil = internal->frameTime + 0.12; #endif }