From 57ecc4ce30a38eecb3eb955c387495c78679517d Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Sat, 7 Oct 2017 14:53:57 +0300 Subject: [PATCH] Removed the last deprecated method in Cocoa backend src/posix/cocoa/i_input.mm:482:36: warning: 'convertScreenToBase:' is deprecated: first deprecated in macOS 10.7 - Use -convertRectFromScreen: instead [-Wdeprecated-declarations] --- src/posix/cocoa/i_input.mm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/posix/cocoa/i_input.mm b/src/posix/cocoa/i_input.mm index eff9640be..7eda4785d 100644 --- a/src/posix/cocoa/i_input.mm +++ b/src/posix/cocoa/i_input.mm @@ -479,8 +479,9 @@ void NSEventToGameMousePosition(NSEvent* inEvent, event_t* outEvent) const NSView* view = [window contentView]; const NSPoint screenPos = [NSEvent mouseLocation]; - const NSPoint windowPos = [window convertScreenToBase:screenPos]; - const NSPoint viewPos = [view convertPointToBacking:windowPos]; + const NSRect screenRect = NSMakeRect(screenPos.x, screenPos.y, 0, 0); + const NSRect windowRect = [window convertRectFromScreen:screenRect]; + const NSPoint viewPos = [view convertPointToBacking:windowRect.origin]; const CGFloat frameHeight = I_GetContentViewSize(window).height; const CGFloat posX = ( viewPos.x - rbOpts.shiftX) / rbOpts.pixelScale;