浏览代码

Fixed compilation error on MacOS X.

James McLean 10 年之前
父节点
当前提交
2f33f820e9
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      platform/osx/os_osx.mm

+ 3 - 1
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};