summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerwindow.cpp
diff options
context:
space:
mode:
authorAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-11 00:19:58 +0300
committerAndreyL ProductEngine <alihatskiy@productengine.com>2019-04-11 00:19:58 +0300
commit724e3cca96422f480d5cff912e764da82c5de03c (patch)
treed4eea3907f2fd12afbdc8a328e5497202e49a6e7 /indra/newview/llviewerwindow.cpp
parentd1b649055dfdfe17674fec6ef713a33c6f9b09fe (diff)
SL-10891 Reset UI scale factor on first run if OS's display scaling is not 100%
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 cc10d08f3a..5b764f97fb 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"), MIN_UI_SCALE, MAX_UI_SCALE) * mWindow->getSystemUISize();