summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorVadim Savchuk <vsavchuk@productengine.com>2010-03-05 20:13:52 +0200
committerVadim Savchuk <vsavchuk@productengine.com>2010-03-05 20:13:52 +0200
commita174a4ff3db22a40fe0259dab260321b20108fb7 (patch)
tree066bfe11ac495025eadaa930bd37a6045b9041be /indra/newview/llappviewer.cpp
parentb60274fad4a7cfdb1ab383bd9f822ef75caa285a (diff)
parent2433de3fac1a07a94e3c031b4528fee90a5fa7d2 (diff)
merge
--HG-- branch : product-engine
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp32
1 files changed, 28 insertions, 4 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index 948d38befb..6d4c90c2b9 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -304,7 +304,8 @@ static std::string gLaunchFileOnQuit;
// Used on Win32 for other apps to identify our window (eg, win_setup)
const char* const VIEWER_WINDOW_CLASSNAME = "Second Life";
-
+static const S32 FIRST_RUN_WINDOW_WIDTH = 1024;
+static const S32 FIRST_RUN_WINDOW_HRIGHT = 768;
//----------------------------------------------------------------------------
// List of entries from strings.xml to always replace
@@ -2362,12 +2363,35 @@ bool LLAppViewer::initWindow()
// store setting in a global for easy access and modification
gNoRender = gSavedSettings.getBOOL("DisableRendering");
+ S32 window_x = gSavedSettings.getS32("WindowX");
+ S32 window_y = gSavedSettings.getS32("WindowY");
+ S32 window_width = gSavedSettings.getS32("WindowWidth");
+ S32 window_height = gSavedSettings.getS32("WindowHeight");
+
+ bool show_maximized = gSavedSettings.getBOOL("WindowMaximized");
+
+ bool first_run = gSavedSettings.getBOOL("FirstLoginThisInstall");
+
+ if (first_run)//for first login
+ {
+ window_width = FIRST_RUN_WINDOW_WIDTH;//yep hardcoded
+ window_height = FIRST_RUN_WINDOW_HRIGHT;
+
+ //if screen resolution is lower then 1024*768 then show maximized
+ LLDisplayInfo display_info;
+ if(display_info.getDisplayWidth() <= FIRST_RUN_WINDOW_WIDTH
+ || display_info.getDisplayHeight()<=FIRST_RUN_WINDOW_HRIGHT)
+ {
+ show_maximized = true;
+ }
+ }
+
// always start windowed
BOOL ignorePixelDepth = gSavedSettings.getBOOL("IgnorePixelDepth");
gViewerWindow = new LLViewerWindow(gWindowTitle,
VIEWER_WINDOW_CLASSNAME,
- gSavedSettings.getS32("WindowX"), gSavedSettings.getS32("WindowY"),
- gSavedSettings.getS32("WindowWidth"), gSavedSettings.getS32("WindowHeight"),
+ window_x, window_y,
+ window_width, window_height,
FALSE, ignorePixelDepth);
LLNotificationsUI::LLNotificationManager::getInstance();
@@ -2378,7 +2402,7 @@ bool LLAppViewer::initWindow()
gViewerWindow->toggleFullscreen(FALSE);
}
- if (gSavedSettings.getBOOL("WindowMaximized"))
+ if (show_maximized)
{
gViewerWindow->mWindow->maximize();
gViewerWindow->getWindow()->setNativeAspectRatio(gSavedSettings.getF32("FullScreenAspectRatio"));