1 parent ac36bfa commit 3b3ac9aCopy full SHA for 3b3ac9a
1 file changed
src/common/input/mouse.hpp
@@ -99,6 +99,9 @@ namespace our {
99
// Locks the mouse position and hides it (Usually used for FPS games)
100
static void lockMouse(GLFWwindow* window) {
101
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_DISABLED);
102
+ glfwSetCursor(
103
+ window,
104
+ nullptr); // This is needed to prevent a GLFW bug where the cursor is visible again after locking it.
105
}
106
// If the mouse was locked, unlock it (make it visible and allow it to move)
107
static void unlockMouse(GLFWwindow* window) {
0 commit comments