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]
This commit is contained in:
alexey.lysiuk 2017-10-07 14:53:57 +03:00
parent 7a43fa6ed7
commit 57ecc4ce30
1 changed files with 3 additions and 2 deletions

View File

@ -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;