From 457df9cd6724c23fff9a88fb7db44b6b04a7769c Mon Sep 17 00:00:00 2001 From: AndreyL ProductEngine Date: Sat, 6 Apr 2019 10:12:27 +0300 Subject: SL-10891 Reset UI scale factor on first run if OS's display scaling is not 100% --- indra/newview/llviewerwindow.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'indra/newview/llviewerwindow.cpp') 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(); -- cgit v1.2.3