From 3df2f5e8c027b96f99b126fb8e6d687703e6bb4a Mon Sep 17 00:00:00 2001 From: Richard Nelson Date: Thu, 9 Jul 2009 02:18:29 +0000 Subject: 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 --- indra/newview/llfloaterpreference.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'indra/newview/llfloaterpreference.cpp') 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("fullscreen combo")->getCurrentIndex(); + S32 resIndex = getChild("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); -- cgit v1.2.3