1
0
Fork 0
mirror of https://github.com/gwm17/glfw.git synced 2024-11-30 05:58:52 -05:00
This commit is contained in:
Camilla Berglund 2012-04-22 12:58:05 +02:00
parent 322ddff5f8
commit 2ac8da7465

View File

@ -1168,7 +1168,7 @@ void _glfwPlatformSetMouseCursorPos(_GLFWwindow* window, int x, int y)
// calculating the maximum y coordinate of all screens, since Cocoa's // calculating the maximum y coordinate of all screens, since Cocoa's
// "global coordinates" are upside down from CG's... // "global coordinates" are upside down from CG's...
NSPoint localPoint = NSMakePoint(x, y); NSPoint localPoint = NSMakePoint(x, window->height - y);
NSPoint globalPoint = [window->NS.object convertBaseToScreen:localPoint]; NSPoint globalPoint = [window->NS.object convertBaseToScreen:localPoint];
CGPoint mainScreenOrigin = CGDisplayBounds(CGMainDisplayID()).origin; CGPoint mainScreenOrigin = CGDisplayBounds(CGMainDisplayID()).origin;
double mainScreenHeight = CGDisplayBounds(CGMainDisplayID()).size.height; double mainScreenHeight = CGDisplayBounds(CGMainDisplayID()).size.height;