diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index f46d0d3ddd..77c3d438a4 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -8441,7 +8441,7 @@ void Application::loadAvatarBrowser() const { void Application::addSnapshotOperator(const SnapshotOperator& snapshotOperator) { std::lock_guard lock(_snapshotMutex); _snapshotOperators.push(snapshotOperator); - _hasPrimarySnapshot |= std::get<2>(snapshotOperator); + _hasPrimarySnapshot = _hasPrimarySnapshot || std::get<2>(snapshotOperator); } bool Application::takeSnapshotOperators(std::queue& snapshotOperators) { @@ -8453,7 +8453,7 @@ bool Application::takeSnapshotOperators(std::queue& snapshotOp } void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRatio, const QString& filename) { - addSnapshotOperator({ [notify, includeAnimated, aspectRatio, filename](const QImage& snapshot) { + addSnapshotOperator(std::make_tuple([notify, includeAnimated, aspectRatio, filename](const QImage& snapshot) { QString path = DependencyManager::get()->saveSnapshot(snapshot, filename, TestScriptingInterface::getInstance()->getTestResultsLocation()); // If we're not doing an animated snapshot as well... @@ -8468,15 +8468,15 @@ void Application::takeSnapshot(bool notify, bool includeAnimated, float aspectRa SnapshotAnimated::saveSnapshotAnimated(path, aspectRatio, DependencyManager::get()); }); } - }, aspectRatio, true }); + }, aspectRatio, true)); } void Application::takeSecondaryCameraSnapshot(const bool& notify, const QString& filename) { - addSnapshotOperator({ [notify, filename](const QImage& snapshot) { + addSnapshotOperator(std::make_tuple([notify, filename](const QImage& snapshot) { QString snapshotPath = DependencyManager::get()->saveSnapshot(snapshot, filename, TestScriptingInterface::getInstance()->getTestResultsLocation()); emit DependencyManager::get()->stillSnapshotTaken(snapshotPath, notify); - }, 0, false }); + }, 0.0f, false)); } void Application::takeSecondaryCamera360Snapshot(const glm::vec3& cameraPosition, const bool& cubemapOutputFormat, const bool& notify, const QString& filename) { diff --git a/interface/src/ui/Snapshot.cpp b/interface/src/ui/Snapshot.cpp index 93d9188cc8..d97c401351 100644 --- a/interface/src/ui/Snapshot.cpp +++ b/interface/src/ui/Snapshot.cpp @@ -168,7 +168,7 @@ void Snapshot::takeNextSnapshot() { if (_taking360Snapshot) { if (!_waitingOnSnapshot) { _waitingOnSnapshot = true; - qApp->addSnapshotOperator({ [this](const QImage& snapshot) { + qApp->addSnapshotOperator(std::make_tuple([this](const QImage& snapshot) { // Order is: // 0. Down // 1. Front @@ -202,7 +202,7 @@ void Snapshot::takeNextSnapshot() { _waitingOnSnapshot = false; _snapshotIndex++; - }, 0, false }); + }, 0.0f, false)); } } else { _snapshotTimer.stop(); diff --git a/interface/src/ui/SnapshotAnimated.cpp b/interface/src/ui/SnapshotAnimated.cpp index f8f6a30635..b8cffca8ab 100644 --- a/interface/src/ui/SnapshotAnimated.cpp +++ b/interface/src/ui/SnapshotAnimated.cpp @@ -60,7 +60,7 @@ void SnapshotAnimated::saveSnapshotAnimated(QString pathStill, float aspectRatio void SnapshotAnimated::captureFrames() { if (SnapshotAnimated::snapshotAnimatedTimerRunning) { - qApp->addSnapshotOperator({ [](const QImage& snapshot) { + qApp->addSnapshotOperator(std::make_tuple([](const QImage& snapshot) { // Get a screenshot from the display, then scale the screenshot down, // then convert it to the image format the GIF library needs, // then save all that to the QImage named "frame" @@ -86,7 +86,7 @@ void SnapshotAnimated::captureFrames() { SnapshotAnimated::snapshotAnimatedTimerRunning = false; } } - }, SnapshotAnimated::aspectRatio, true }); + }, SnapshotAnimated::aspectRatio, true)); } else { // Notify the user that we're processing the snapshot // This also pops up the "Share" dialog. The unprocessed GIF will be visualized as a loading icon until processingGifCompleted() is called.