Delay taking snapshot further at low render rates

This commit is contained in:
David Rowe 2020-07-16 08:50:10 +12:00
parent 69aa61174f
commit 6a6bf6a5e0

View file

@ -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 });
}