diff options
Diffstat (limited to 'indra/newview/llviewerwindow.cpp')
| -rw-r--r-- | indra/newview/llviewerwindow.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/indra/newview/llviewerwindow.cpp b/indra/newview/llviewerwindow.cpp index dea96e2012..1d54ddcdae 100644 --- a/indra/newview/llviewerwindow.cpp +++ b/indra/newview/llviewerwindow.cpp @@ -1777,7 +1777,7 @@ bool LLViewerWindow::handleTimerEvent(LLWindow *window) return false; } -bool LLViewerWindow::handleDeviceChange(LLWindow *window) +bool LLViewerWindow::handleDeviceChange(LLWindow *window, const std::string& change_type) { // give a chance to use a joystick after startup (hot-plugging) if (!LLViewerJoystick::getInstance()->isJoystickInitialized() ) @@ -1785,6 +1785,10 @@ bool LLViewerWindow::handleDeviceChange(LLWindow *window) LLViewerJoystick::getInstance()->init(true); return true; } + else + { + LL_INFOS("Window") << "Device change event: " << change_type << LL_ENDL; + } return false; } @@ -1806,6 +1810,7 @@ bool LLViewerWindow::handleDPIChanged(LLWindow *window, F32 ui_scale_factor, S32 bool LLViewerWindow::handleDisplayChanged() { + LL_INFOS("Window") << "Display change event" << LL_ENDL; LLFontGL::sResolutionGeneration++; return false; } @@ -2010,7 +2015,7 @@ LLViewerWindow::LLViewerWindow(const Params& p) LL_DEBUGS("Window") << "Loading feature tables." << LL_ENDL; // Initialize OpenGL Renderer - LLVertexBuffer::initClass(mWindow); + LLVertexBuffer::initClass(mWindow, gSavedSettings.getU32("MPVertexBufferMode")); LL_INFOS("RenderInit") << "LLVertexBuffer initialization done." << LL_ENDL ; if (!gGL.init(true)) { @@ -2063,6 +2068,8 @@ LLViewerWindow::LLViewerWindow(const Params& p) mDebugText = new LLDebugText(this); mWorldViewRectScaled = calcScaledRect(mWorldViewRectRaw, mDisplayScale); + + mWindow->toggleVSync(gSavedSettings.getBOOL("RenderVSyncEnabled")); } std::string LLViewerWindow::getLastSnapshotDir() @@ -3923,7 +3930,7 @@ void LLViewerWindow::updateLayout() void LLViewerWindow::updateMouseDelta() { -#if LL_WINDOWS +#if LL_WINDOWS && !LL_SDL LLCoordCommon delta; mWindow->getCursorDelta(&delta); S32 dx = delta.mX; @@ -4908,13 +4915,21 @@ void LLViewerWindow::saveImageLocal(LLImageFormatted *image, const snapshot_save auto err = 0; auto extension("." + image->getExtension()); auto now = LLDate::now(); + static LLCachedControl<bool> snapshot_timestamp(gSavedSettings, "SnapshotTimestamp", true); do { filepath = sSnapshotDir; filepath += gDirUtilp->getDirDelimiter(); filepath += sSnapshotBaseName; + if (snapshot_timestamp) + { filepath += now.toLocalDateString("_%Y-%m-%d_%H%M%S"); filepath += llformat("%.2d", i); + } + else if (is_snapshot_name_loc_set) + { + filepath += llformat("_%.3d", i); + } filepath += extension; llstat stat_info; @@ -5279,7 +5294,7 @@ bool LLViewerWindow::rawSnapshot(LLImageRaw *raw, S32 image_width, S32 image_hei glReadPixels( subimage_x_offset, out_y + subimage_y_offset, read_width, 1, - GL_DEPTH_COMPONENT, GL_FLOAT, + GL_DEPTH_COMPONENT, GL_UNSIGNED_INT, depth_line_buffer->getData()// current output pixel is beginning of buffer... ); |
