diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-06 10:12:27 +0300 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-04-06 10:12:27 +0300 |
commit | 457df9cd6724c23fff9a88fb7db44b6b04a7769c (patch) | |
tree | 94964093b536434600d728e3723259a58ea7873f /indra/newview/llviewerwindow.cpp | |
parent | 3c91eac8ee4f859e907dba86fd1d89fc9cd1cddc (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.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cc10d08f3a..bc4a78e143 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("FSResetUIScaleOnFirstRun")) + { + 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(); |