diff options
author | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2018-11-26 18:02:44 +0200 |
---|---|---|
committer | ruslantproductengine <ruslantproductengine@lindenlab.com> | 2018-11-26 18:02:44 +0200 |
commit | acc86a9139872e182fbeb5b9fc7daa12c5d2c029 (patch) | |
tree | 140e401c78b6c279b699e3e859f7b9d4bfe75873 /indra/llwindow/llopenglview-objc.mm | |
parent | 62085f9f7904aa20406aa4f0122065aec3a786ee (diff) |
SL-9766 [Render] [Mac] Alt + left mouse click has severely impaired functions
SL-10019 - [Mac] [Render] Right-click context menu immediately disappears when clicking any place in the ‘Inventory’ floater
SL-9984 - [Retina] Camera frustum, do not display correctly on "WORLD MAP" window.
SL-10027 - [Mac] [Render] Add toggle for Retina support to mitigate FPS loss
Re-FIX for Retina support.
Diffstat (limited to 'indra/llwindow/llopenglview-objc.mm')
-rw-r--r-- | indra/llwindow/llopenglview-objc.mm | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index ee05fd5cc9..54a4793b2d 100644 --- a/indra/llwindow/llopenglview-objc.mm +++ b/indra/llwindow/llopenglview-objc.mm @@ -28,6 +28,8 @@ #import "llwindowmacosx-objc.h" #import "llappdelegate-objc.h" +extern BOOL gHiDPISupport; + #pragma mark local functions NativeKeyEventData extractKeyDataFromKeyEvent(NSEvent* theEvent) @@ -189,7 +191,7 @@ attributedStringInfo getSegments(NSAttributedString *str) { if (!mOldResize) //Maint-3288 { - NSSize dev_sz = [self convertSizeToBacking:[self frame].size]; + NSSize dev_sz = gHiDPISupport ? [self convertSizeToBacking:[self frame].size] : [self frame].size; callResize(dev_sz.width, dev_sz.height); } } @@ -276,7 +278,7 @@ attributedStringInfo getSegments(NSAttributedString *str) [self setPixelFormat:pixelFormat]; //for retina support - [self setWantsBestResolutionOpenGLSurface:YES]; + [self setWantsBestResolutionOpenGLSurface:gHiDPISupport]; [self setOpenGLContext:glContext]; @@ -369,7 +371,7 @@ attributedStringInfo getSegments(NSAttributedString *str) callRightMouseUp(mMousePos, [theEvent modifierFlags]); mSimulatedRightClick = false; } else { - NSPoint mPoint = [self convertPointToBacking:[theEvent locationInWindow]]; + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; mMousePos[0] = mPoint.x; mMousePos[1] = mPoint.y; callLeftMouseUp(mMousePos, [theEvent modifierFlags]); @@ -388,7 +390,7 @@ attributedStringInfo getSegments(NSAttributedString *str) - (void)mouseMoved:(NSEvent *)theEvent { - NSPoint dev_delta = [self convertPointToBacking:NSMakePoint([theEvent deltaX], [theEvent deltaY])]; + NSPoint dev_delta = gHiDPISupport ? [self convertPointToBacking:NSMakePoint([theEvent deltaX], [theEvent deltaY])] : NSMakePoint([theEvent deltaX], [theEvent deltaY]); float mouseDeltas[] = { float(dev_delta.x), @@ -397,7 +399,7 @@ attributedStringInfo getSegments(NSAttributedString *str) callDeltaUpdate(mouseDeltas, 0); - NSPoint mPoint = [self convertPointToBacking:[theEvent locationInWindow]]; + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; mMousePos[0] = mPoint.x; mMousePos[1] = mPoint.y; callMouseMoved(mMousePos, 0); @@ -412,7 +414,7 @@ attributedStringInfo getSegments(NSAttributedString *str) // The old CoreGraphics APIs we previously relied on are now flagged as obsolete. // NSEvent isn't obsolete, and provides us with the correct deltas. - NSPoint dev_delta = [self convertPointToBacking:NSMakePoint([theEvent deltaX], [theEvent deltaY])]; + NSPoint dev_delta = gHiDPISupport ? [self convertPointToBacking:NSMakePoint([theEvent deltaX], [theEvent deltaY])] : NSMakePoint([theEvent deltaX], [theEvent deltaY]); float mouseDeltas[] = { float(dev_delta.x), @@ -421,7 +423,7 @@ attributedStringInfo getSegments(NSAttributedString *str) callDeltaUpdate(mouseDeltas, 0); - NSPoint mPoint = [self convertPointToBacking:[theEvent locationInWindow]]; + NSPoint mPoint = gHiDPISupport ? [self convertPointToBacking:[theEvent locationInWindow]] : [theEvent locationInWindow]; mMousePos[0] = mPoint.x; mMousePos[1] = mPoint.y; callMouseDragged(mMousePos, 0); |