summaryrefslogtreecommitdiff
path: root/indra/newview/llsnapshotlivepreview.cpp
diff options
context:
space:
mode:
authorCinder Biscuits <cinder@alchemyviewer.org>2015-11-29 20:14:22 -0700
committerCinder Biscuits <cinder@alchemyviewer.org>2015-11-29 20:14:22 -0700
commitcc235cdcc41fb1846b878769f5d4097ff9ad3b4d (patch)
treed34f501bcfd68cad9dd2a3a3bbbb03129e24462f /indra/newview/llsnapshotlivepreview.cpp
parent0ba5502506d84fb2a41ce62cb8025ec93b652d38 (diff)
parente611e35e033e99f619b0e4938f6879c8e387efd5 (diff)
Merged lindenlab/viewer-tools-update into default
Diffstat (limited to 'indra/newview/llsnapshotlivepreview.cpp')
-rw-r--r--indra/newview/llsnapshotlivepreview.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/indra/newview/llsnapshotlivepreview.cpp b/indra/newview/llsnapshotlivepreview.cpp
index ee5fd7cb71..0ae8a338e0 100644
--- a/indra/newview/llsnapshotlivepreview.cpp
+++ b/indra/newview/llsnapshotlivepreview.cpp
@@ -116,6 +116,8 @@ LLSnapshotLivePreview::LLSnapshotLivePreview (const LLSnapshotLivePreview::Param
mThumbnailUpdateLock = FALSE ;
mThumbnailUpToDate = FALSE ;
mBigThumbnailUpToDate = FALSE ;
+
+ mForceUpdateSnapshot = FALSE;
}
LLSnapshotLivePreview::~LLSnapshotLivePreview()
@@ -671,18 +673,19 @@ BOOL LLSnapshotLivePreview::onIdle( void* snapshot_preview )
// If we're in freeze-frame mode and camera has moved, update snapshot.
LLVector3 new_camera_pos = LLViewerCamera::getInstance()->getOrigin();
LLQuaternion new_camera_rot = LLViewerCamera::getInstance()->getQuaternion();
- if (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
- (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f))
+ if (previewp->mForceUpdateSnapshot || (gSavedSettings.getBOOL("FreezeTime") && previewp->mAllowFullScreenPreview &&
+ (new_camera_pos != previewp->mCameraPos || dot(new_camera_rot, previewp->mCameraRot) < 0.995f)))
{
previewp->mCameraPos = new_camera_pos;
previewp->mCameraRot = new_camera_rot;
// request a new snapshot whenever the camera moves, with a time delay
- BOOL autosnap = gSavedSettings.getBOOL("AutoSnapshot");
+ BOOL new_snapshot = gSavedSettings.getBOOL("AutoSnapshot") || previewp->mForceUpdateSnapshot;
LL_DEBUGS() << "camera moved, updating thumbnail" << LL_ENDL;
previewp->updateSnapshot(
- autosnap, // whether a new snapshot is needed or merely invalidate the existing one
+ new_snapshot, // whether a new snapshot is needed or merely invalidate the existing one
FALSE, // or if 1st arg is false, whether to produce a new thumbnail image.
- autosnap ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+ new_snapshot ? AUTO_SNAPSHOT_TIME_DELAY : 0.f); // shutter delay if 1st arg is true.
+ previewp->mForceUpdateSnapshot = FALSE;
}
// see if it's time yet to snap the shot and bomb out otherwise.