diff --git a/indra/newview/app_settings/settings.xml b/indra/newview/app_settings/settings.xml
index d4aa207453..83e5b7cbb1 100644
--- a/indra/newview/app_settings/settings.xml
+++ b/indra/newview/app_settings/settings.xml
@@ -25155,7 +25155,7 @@ Change of this parameter will affect the layout of buttons in notification toast
Type
Boolean
Value
- 0
+ 0
FSLookAtTargetMaxDistance
+ FSResetUIScaleOnFirstRun
+
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp
index 9641a1f935..f07c603d44 100644
--- a/indra/newview/llviewerwindow.cpp
+++ b/indra/newview/llviewerwindow.cpp
@@ -1841,6 +1841,17 @@ 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("FSResetUIScaleOnFirstRun", 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();