mirror of
https://github.com/glfw/glfw.git
synced 2025-10-04 05:36:35 +00:00
Merge 87681872fe
into 04a439a0a0
This commit is contained in:
commit
f3567b2e47
@ -1165,10 +1165,10 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
const NSPoint localPoint = NSMakePoint(x, contentRect.size.height - y - 1);
|
const NSPoint localPoint = NSMakePoint(x, contentRect.size.height - y - 1);
|
||||||
const NSPoint globalPoint = [window->ns.object convertBaseToScreen:localPoint];
|
const NSRect globalPoint = [window->ns.object convertRectToScreen:NSMakeRect(localPoint.x, localPoint.y, 0, 0)];
|
||||||
|
|
||||||
CGWarpMouseCursorPosition(CGPointMake(globalPoint.x,
|
CGWarpMouseCursorPosition(CGPointMake(globalPoint.origin.x,
|
||||||
transformY(globalPoint.y)));
|
transformY(globalPoint.origin.y)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user