mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 09:01:46 +00:00
Merge pull request #84 from Nibe/cursor-fix
Fixed saved cursor position not being restored.
This commit is contained in:
commit
0e12fb869c
@ -55,7 +55,12 @@ static void setCursorMode(_GLFWwindow* window, int newMode)
|
||||
if (window == _glfw.focusedWindow)
|
||||
{
|
||||
if (oldMode == GLFW_CURSOR_DISABLED)
|
||||
{
|
||||
window->cursorPosX = _glfw.cursorPosX;
|
||||
window->cursorPosY = _glfw.cursorPosY;
|
||||
|
||||
_glfwPlatformSetCursorPos(window, _glfw.cursorPosX, _glfw.cursorPosY);
|
||||
}
|
||||
else if (newMode == GLFW_CURSOR_DISABLED)
|
||||
{
|
||||
int width, height;
|
||||
|
Loading…
Reference in New Issue
Block a user