Merge pull request #538 from ctrlaltdavid/fix/camera-in-screenshot

Delay taking snapshot further at low render rates
This commit is contained in:
kasenvr 2020-07-25 15:40:39 -04:00 committed by GitHub
commit bfb4eaeb21
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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