| 661 | |
| 662 | |
| 663 | void Window::cursorUnlock() { |
| 664 | if (!settings::allowCursorLock) |
| 665 | return; |
| 666 | if (!internal->cursorLocked) |
| 667 | return; |
| 668 | |
| 669 | // Restore cursor position when locked |
| 670 | glfwSetCursorPos(win, internal->cursorLockedPosX, internal->cursorLockedPosY); |
| 671 | internal->cursorLocked = false; |
| 672 | glfwSetInputMode(win, GLFW_CURSOR, GLFW_CURSOR_NORMAL); |
| 673 | } |
| 674 | |
| 675 | |
| 676 | bool Window::isCursorLocked() { |