From 2f33f820e995ec080fc4a4f36e7cbe3c139613b0 Mon Sep 17 00:00:00 2001 From: James McLean Date: Mon, 22 Jun 2015 00:56:49 -0400 Subject: [PATCH] Fixed compilation error on MacOS X. --- platform/osx/os_osx.mm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/platform/osx/os_osx.mm b/platform/osx/os_osx.mm index e2ff8d1116..72699366c4 100644 --- a/platform/osx/os_osx.mm +++ b/platform/osx/os_osx.mm @@ -1113,7 +1113,9 @@ void OS_OSX::warp_mouse_pos(const Point2& p_to) { NSPoint localPoint = { p_to.x, p_to.y }; NSPoint pointInWindow = [window_view convertPoint:localPoint toView:nil]; - NSPoint pointOnScreen = [[window_view window] convertRectToScreen:(NSRect){.origin=pointInWindow}].origin; + NSRect pointInWindowRect; + pointInWindowRect.origin = pointInWindow; + NSPoint pointOnScreen = [[window_view window] convertRectToScreen:pointInWindowRect].origin; //point in scren coords CGPoint lMouseWarpPos = { pointOnScreen.x, pointOnScreen.y};