summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterpreference.cpp
diff options
context:
space:
mode:
authorRichard Nelson <richard@lindenlab.com>2009-07-09 02:18:29 +0000
committerRichard Nelson <richard@lindenlab.com>2009-07-09 02:18:29 +0000
commit3df2f5e8c027b96f99b126fb8e6d687703e6bb4a (patch)
tree55676e5f0eb83e42575a030347a7d1665d29b5eb /indra/newview/llfloaterpreference.cpp
parent75e1187f3182e726e15ace55d38885a6385d4b33 (diff)
DEV-35153 - fix for ui scale breaking picking (pie menu etc) by normalizing world rect dimensions against ui scale
DEV-35154 - switching to fullscreen fails with bad resolution reviewed by Brad
Diffstat (limited to 'indra/newview/llfloaterpreference.cpp')
-rw-r--r--indra/newview/llfloaterpreference.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/indra/newview/llfloaterpreference.cpp b/indra/newview/llfloaterpreference.cpp
index 6834af4fd5..53b88d9f57 100644
--- a/indra/newview/llfloaterpreference.cpp
+++ b/indra/newview/llfloaterpreference.cpp
@@ -1224,7 +1224,12 @@ void LLFloaterPreference::applyResolution()
S32 num_resolutions;
LLWindow::LLWindowResolution* supported_resolutions =
gViewerWindow->getWindow()->getSupportedResolutions(num_resolutions);
- U32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ S32 resIndex = getChild<LLComboBox>("fullscreen combo")->getCurrentIndex();
+ if (resIndex == -1)
+ {
+ // use highest resolution if nothing selected
+ resIndex = num_resolutions - 1;
+ }
gSavedSettings.setS32("FullScreenWidth", supported_resolutions[resIndex].mWidth);
gSavedSettings.setS32("FullScreenHeight", supported_resolutions[resIndex].mHeight);