summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-17 16:45:28 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-17 16:45:28 +0300
commit459601625d0f2a7b8f5454261fc69e55ce7419e3 (patch)
treeb0502d9722dad46dfac35858b62858150942866c /indra/newview/llviewerwindow.cpp
parent19cae5d2ccbefee3741a80b8bc8e486dccf26873 (diff)
parent81dbd3663bdaff741e68de0ec4d4d35bedf6649d (diff)
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r--indra/newview/llviewerwindow.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index f1f7e78075..963952fdb1 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1763,6 +1763,16 @@ LLViewerWindow::LLViewerWindow(const Params& p)
LLCoordScreen scr;
mWindow->getSize(&scr);
+ // Reset UI scale factor on first run if OS's display scaling is not 100%
+ if (gSavedSettings.getBOOL("ResetUIScaleOnFirstRun"))
+ {
+ if (mWindow->getSystemUISize() != 1.f)
+ {
+ gSavedSettings.setF32("UIScaleFactor", 1.f);
+ }
+ gSavedSettings.setBOOL("ResetUIScaleOnFirstRun", FALSE);
+ }
+
// Get the real window rect the window was created with (since there are various OS-dependent reasons why
// the size of a window or fullscreen context may have been adjusted slightly...)
F32 ui_scale_factor = llclamp(gSavedSettings.getF32("UIScaleFactor") * mWindow->getSystemUISize(), MIN_UI_SCALE, MAX_UI_SCALE);