diff --git a/indra/llwindow/llopenglview-objc.mm b/indra/llwindow/llopenglview-objc.mm index 1459acd49666a4d0b3ff4296cf93af14c9f8e614..4b22489b29fee4d8e6dcc7614bc87aacfa50c43d 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) @@ -247,7 +249,8 @@ attributedStringInfo getSegments(NSAttributedString *str) } //for retina support - //[self setWantsBestResolutionOpenGLSurface:YES]; + BOOL requestHiDPI = gHiDPISupport ? YES : NO; + [self setWantsBestResolutionOpenGLSurface:requestHiDPI]; [self setPixelFormat:pixelFormat]; diff --git a/indra/llwindow/llwindowmacosx.cpp b/indra/llwindow/llwindowmacosx.cpp index 217b1375c0e87440abfa64db3b36ebe210fca622..292d021c7858eaf5d883b4f17a7a1ba338896545 100644 --- a/indra/llwindow/llwindowmacosx.cpp +++ b/indra/llwindow/llwindowmacosx.cpp @@ -43,6 +43,7 @@ #include <CoreGraphics/CGDisplayConfiguration.h> extern BOOL gDebugWindowProc; +BOOL gHiDPISupport = TRUE; const S32 BITS_PER_PIXEL = 32; const S32 MAX_NUM_RESOLUTIONS = 32; diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 60ce92d81ae7dcf0c802c54ac6a2592dd8580f7a..54b4ee08215be02ea9e0d33fb2f8e5703fdc0753 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -290,6 +290,10 @@ extern BOOL gRandomizeFramerate; extern BOOL gPeriodicSlowFrame; extern BOOL gDebugGL; +#if LL_DARWIN +extern BOOL gHiDPISupport; +#endif + //////////////////////////////////////////////////////////// // All from the last globals push... @@ -604,6 +608,10 @@ static void settings_to_globals() gDebugWindowProc = gSavedSettings.getBOOL("DebugWindowProc"); gShowObjectUpdates = gSavedSettings.getBOOL("ShowObjectUpdates"); LLWorldMapView::sMapScale = gSavedSettings.getF32("MapScale"); + +#if LL_DARWIN + gHiDPISupport = gSavedSettings.getBOOL("RenderHiDPI"); +#endif } static void settings_modify() @@ -3204,7 +3212,7 @@ LLSD LLAppViewer::getViewerInfo() const info["TEXTURE_MEMORY"] = gSavedSettings.getS32("TextureMemory"); #if LL_DARWIN - info["HIDPI"] = TRUE; + info["HIDPI"] = gHiDPISupport; #endif // Libraries