diff options
author | callum <none@none> | 2011-11-11 12:29:04 -0800 |
---|---|---|
committer | callum <none@none> | 2011-11-11 12:29:04 -0800 |
commit | e4e4977f5eab5aac24c32b569c5273c4be926cb2 (patch) | |
tree | 93fc0900f80be0660cdd1e33c108aad7ce135a09 /indra/newview/llviewerwindow.cpp | |
parent | 1b56b7d2e5ad2b5c4ca2c733b25d1fd7dc78f634 (diff) |
EXP-1527 FIX Debug values for windowwidth and windowheight can be set below minimum required values
and
EXP-1528 Launching viewer with a settings.xml file with windowwidth and windowheight set below minimum values, launches to those values not minimum window size
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
-rw-r--r-- | indra/newview/llviewerwindow.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index cf21ac4e5d..140cbb4e04 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -2161,8 +2161,18 @@ void LLViewerWindow::reshape(S32 width, S32 height) if (!maximized && mWindow->getSize(&window_size)) { - gSavedSettings.setS32("WindowWidth", window_size.mX); - gSavedSettings.setS32("WindowHeight", window_size.mY); + U32 min_window_width=gSavedSettings.getU32("MinWindowWidth"); + if ( window_size.mX < min_window_width ) + window_size.mX=min_window_width; + gSavedSettings.setU32("WindowWidth", window_size.mX); + + U32 min_window_height=gSavedSettings.getU32("MinWindowHeight"); + if ( window_size.mY < min_window_height ) + window_size.mY=min_window_height; + gSavedSettings.setU32("WindowHeight", window_size.mY); + + // tell the OS specific window code about min windoow size + mWindow->setMinSize(min_window_width, min_window_height); } LLViewerStats::getInstance()->setStat(LLViewerStats::ST_WINDOW_WIDTH, (F64)width); |