OSX fixed set cursor position on retina in fullscr.

Weird behavior.

glfwSetCursorPos worked fine in fullscreen if I had monitor connected to the laptop, on either display.
But was offset by about 200px in fullscreen if no monitor was connected.
This commit is contained in:
Andri Pálsson 2013-10-06 17:51:37 +02:00
parent 28a0dc0fb9
commit 6a26ef0920

View File

@ -1058,6 +1058,10 @@ void _glfwPlatformSetCursorPos(_GLFWwindow* window, double x, double y)
CGDisplayMoveCursorToPoint(window->monitor->ns.displayID,
CGPointMake(x, y));
}
else if ([window->ns.view isInFullScreenMode])
{
CGWarpMouseCursorPosition(CGPointMake(x, y));
}
else
{
const NSRect contentRect = [window->ns.view frame];