aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpaneldisplay.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:45:11 -0500
committerJacek Antonelli2008-08-15 23:45:11 -0500
commit215f423cbe18fe9ca14a26caef918d303bad28ff (patch)
tree0743442b286216cc8e19aa487c26f4e9345ffd64 /linden/indra/newview/llpaneldisplay.cpp
parentSecond Life viewer sources 1.18.3.5-RC (diff)
downloadmeta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.zip
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.gz
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.bz2
meta-impy-215f423cbe18fe9ca14a26caef918d303bad28ff.tar.xz
Second Life viewer sources 1.18.4.0-RC
Diffstat (limited to 'linden/indra/newview/llpaneldisplay.cpp')
-rw-r--r--linden/indra/newview/llpaneldisplay.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/linden/indra/newview/llpaneldisplay.cpp b/linden/indra/newview/llpaneldisplay.cpp
index 4a03900..3b2edcc 100644
--- a/linden/indra/newview/llpaneldisplay.cpp
+++ b/linden/indra/newview/llpaneldisplay.cpp
@@ -2,6 +2,8 @@
2 * @file llpaneldisplay.cpp 2 * @file llpaneldisplay.cpp
3 * @brief Display preferences for the preferences floater 3 * @brief Display preferences for the preferences floater
4 * 4 *
5 * $LicenseInfo:firstyear=2001&license=viewergpl$
6 *
5 * Copyright (c) 2001-2007, Linden Research, Inc. 7 * Copyright (c) 2001-2007, Linden Research, Inc.
6 * 8 *
7 * Second Life Viewer Source Code 9 * Second Life Viewer Source Code
@@ -24,6 +26,7 @@
24 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO 26 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
25 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY, 27 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
26 * COMPLETENESS OR PERFORMANCE. 28 * COMPLETENESS OR PERFORMANCE.
29 * $/LicenseInfo$
27 */ 30 */
28 31
29#include "llviewerprecompiledheaders.h" 32#include "llviewerprecompiledheaders.h"
@@ -387,20 +390,20 @@ void LLPanelDisplay::onCommitAutoDetectAspect(LLUICtrl *ctrl, void *data)
387 390
388 if (auto_detect) 391 if (auto_detect)
389 { 392 {
390 char aspect[100]; /*Flawfinder: ignore*/
391 S32 numerator = 0; 393 S32 numerator = 0;
392 S32 denominator = 0; 394 S32 denominator = 0;
393 // clear any aspect ratio override 395 // clear any aspect ratio override
394 gViewerWindow->mWindow->setNativeAspectRatio(0.f); 396 gViewerWindow->mWindow->setNativeAspectRatio(0.f);
395 fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator); 397 fractionFromDecimal(gViewerWindow->mWindow->getNativeAspectRatio(), numerator, denominator);
396 398
399 LLString aspect;
397 if (numerator != 0) 400 if (numerator != 0)
398 { 401 {
399 snprintf(aspect, sizeof(aspect), "%d:%d", numerator, denominator); /* Flawfinder: ignore */ 402 aspect = llformat("%d:%d", numerator, denominator);
400 } 403 }
401 else 404 else
402 { 405 {
403 snprintf(aspect, sizeof(aspect), "%.3f", gViewerWindow->mWindow->getNativeAspectRatio()); /* Flawfinder: ignore */ 406 aspect = llformat("%.3f", gViewerWindow->mWindow->getNativeAspectRatio());
404 } 407 }
405 408
406 panel->mCtrlAspectRatio->setLabel(aspect); 409 panel->mCtrlAspectRatio->setLabel(aspect);