diff options
Diffstat (limited to 'linden/indra/newview/llviewerwindow.cpp')
-rw-r--r-- | linden/indra/newview/llviewerwindow.cpp | 39 |
1 files changed, 35 insertions, 4 deletions
diff --git a/linden/indra/newview/llviewerwindow.cpp b/linden/indra/newview/llviewerwindow.cpp index d90b33a..64c042a 100644 --- a/linden/indra/newview/llviewerwindow.cpp +++ b/linden/indra/newview/llviewerwindow.cpp | |||
@@ -237,8 +237,6 @@ const F32 FAST_FRAME_INCREMENT = 0.1f; | |||
237 | 237 | ||
238 | const F32 MIN_DISPLAY_SCALE = 0.75f; | 238 | const F32 MIN_DISPLAY_SCALE = 0.75f; |
239 | 239 | ||
240 | const S32 CONSOLE_BOTTOM_PAD = 40; | ||
241 | |||
242 | std::string LLViewerWindow::sSnapshotBaseName; | 240 | std::string LLViewerWindow::sSnapshotBaseName; |
243 | std::string LLViewerWindow::sSnapshotDir; | 241 | std::string LLViewerWindow::sSnapshotDir; |
244 | 242 | ||
@@ -1375,6 +1373,18 @@ void LLViewerWindow::handlePingWatchdog(LLWindow *window, const char * msg) | |||
1375 | LLAppViewer::instance()->pingMainloopTimeout(msg); | 1373 | LLAppViewer::instance()->pingMainloopTimeout(msg); |
1376 | } | 1374 | } |
1377 | 1375 | ||
1376 | |||
1377 | void LLViewerWindow::handleResumeWatchdog(LLWindow *window) | ||
1378 | { | ||
1379 | LLAppViewer::instance()->resumeMainloopTimeout(); | ||
1380 | } | ||
1381 | |||
1382 | void LLViewerWindow::handlePauseWatchdog(LLWindow *window) | ||
1383 | { | ||
1384 | LLAppViewer::instance()->pauseMainloopTimeout(); | ||
1385 | } | ||
1386 | |||
1387 | |||
1378 | // | 1388 | // |
1379 | // Classes | 1389 | // Classes |
1380 | // | 1390 | // |
@@ -1583,6 +1593,8 @@ void LLViewerWindow::initBase() | |||
1583 | LLRect floater_view_rect = full_window; | 1593 | LLRect floater_view_rect = full_window; |
1584 | // make space for menu bar if we have one | 1594 | // make space for menu bar if we have one |
1585 | floater_view_rect.mTop -= MENU_BAR_HEIGHT; | 1595 | floater_view_rect.mTop -= MENU_BAR_HEIGHT; |
1596 | |||
1597 | // TODO: Eliminate magic constants - please used named constants if changing this | ||
1586 | floater_view_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 2; | 1598 | floater_view_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 2; |
1587 | 1599 | ||
1588 | // Check for non-first startup | 1600 | // Check for non-first startup |
@@ -1601,7 +1613,10 @@ void LLViewerWindow::initBase() | |||
1601 | llassert( !gConsole ); | 1613 | llassert( !gConsole ); |
1602 | LLRect console_rect = full_window; | 1614 | LLRect console_rect = full_window; |
1603 | console_rect.mTop -= 24; | 1615 | console_rect.mTop -= 24; |
1604 | console_rect.mBottom += STATUS_BAR_HEIGHT + 12 + 16 + 12; | 1616 | |
1617 | console_rect.mBottom += getChatConsoleBottomPad(); | ||
1618 | |||
1619 | // TODO: Eliminate magic constants - please used named constants if changing this - don't be a programmer hater | ||
1605 | console_rect.mLeft += 24; //gSavedSettings.getS32("StatusBarButtonWidth") + gSavedSettings.getS32("StatusBarPad"); | 1620 | console_rect.mLeft += 24; //gSavedSettings.getS32("StatusBarButtonWidth") + gSavedSettings.getS32("StatusBarPad"); |
1606 | 1621 | ||
1607 | if (gSavedSettings.getBOOL("ChatFullWidth")) | 1622 | if (gSavedSettings.getBOOL("ChatFullWidth")) |
@@ -2967,7 +2982,7 @@ BOOL LLViewerWindow::handlePerFrameHover() | |||
2967 | 2982 | ||
2968 | // Always update console | 2983 | // Always update console |
2969 | LLRect console_rect = gConsole->getRect(); | 2984 | LLRect console_rect = gConsole->getRect(); |
2970 | console_rect.mBottom = gHUDView->getRect().mBottom + CONSOLE_BOTTOM_PAD; | 2985 | console_rect.mBottom = gHUDView->getRect().mBottom + getChatConsoleBottomPad(); |
2971 | gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); | 2986 | gConsole->reshape(console_rect.getWidth(), console_rect.getHeight()); |
2972 | gConsole->setRect(console_rect); | 2987 | gConsole->setRect(console_rect); |
2973 | } | 2988 | } |
@@ -4232,6 +4247,13 @@ BOOL LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei | |||
4232 | - output_buffer_offset_x // ...minus buffer padding x... | 4247 | - output_buffer_offset_x // ...minus buffer padding x... |
4233 | - (output_buffer_offset_y * (raw->getWidth())) // ...minus buffer padding y... | 4248 | - (output_buffer_offset_y * (raw->getWidth())) // ...minus buffer padding y... |
4234 | ) * raw->getComponents(); | 4249 | ) * raw->getComponents(); |
4250 | |||
4251 | // Ping the wathdog thread every 100 lines to keep us alive (arbitrary number, feel free to change) | ||
4252 | if (out_y % 100 == 0) | ||
4253 | { | ||
4254 | LLAppViewer::instance()->pingMainloopTimeout("LLViewerWindow::rawSnapshot"); | ||
4255 | } | ||
4256 | |||
4235 | if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR) | 4257 | if (type == SNAPSHOT_TYPE_OBJECT_ID || type == SNAPSHOT_TYPE_COLOR) |
4236 | { | 4258 | { |
4237 | glReadPixels( | 4259 | glReadPixels( |
@@ -4873,6 +4895,15 @@ void LLViewerWindow::calcDisplayScale() | |||
4873 | } | 4895 | } |
4874 | } | 4896 | } |
4875 | 4897 | ||
4898 | S32 LLViewerWindow::getChatConsoleBottomPad() | ||
4899 | { | ||
4900 | S32 offset = 0; | ||
4901 | if( gToolBar && gToolBar->getVisible() ) | ||
4902 | offset += TOOL_BAR_HEIGHT; | ||
4903 | |||
4904 | return offset; | ||
4905 | } | ||
4906 | |||
4876 | //---------------------------------------------------------------------------- | 4907 | //---------------------------------------------------------------------------- |
4877 | 4908 | ||
4878 | // static | 4909 | // static |