From 6a6bf6a5e0dee65f33906686c54e229dc41eb720 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Thu, 16 Jul 2020 08:50:10 +1200 Subject: [PATCH] Delay taking snapshot further at low render rates --- scripts/system/snapshot.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/system/snapshot.js b/scripts/system/snapshot.js index a37fb13bd9..3c361b1644 100644 --- a/scripts/system/snapshot.js +++ b/scripts/system/snapshot.js @@ -474,9 +474,10 @@ function takeSnapshot() { volume: 1.0 }); HMD.closeTablet(); + var DOUBLE_RENDER_TIME_TO_MS = 2000; // If rendering is bogged down, allow double the render time to close the tablet. Script.setTimeout(function () { Window.takeSnapshot(false, includeAnimated, 1.91); - }, SNAPSHOT_DELAY); + }, Math.max(SNAPSHOT_DELAY, DOUBLE_RENDER_TIME_TO_MS / Rates.render )); }, FINISH_SOUND_DELAY); UserActivityLogger.logAction("snaphshot_taken", { location: location.href }); }