mirror of
				https://github.com/glfw/glfw.git
				synced 2025-10-30 20:22:30 +00:00 
			
		
		
		
	Fix incorrect cursor position
When reactivating the cursor its position was updated visually but not internally which caused glfwGetCursorPos to return wrong values.
This commit is contained in:
		
							parent
							
								
									4b7ae4918b
								
							
						
					
					
						commit
						a55c3f48eb
					
				| @ -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