Merge pull request #48268 from dsnopek/issue-48178

Fixes #48178: WebXR broken when built with Emscripten 2.0.13 or later
This commit is contained in:
Fabio Alessandrelli 2021-04-28 16:02:58 +02:00 committed by GitHub
commit 4ea7363304
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -71,10 +71,8 @@ const GodotWebXR = {
// enabled or disabled. When using the WebXR API Emulator, this // enabled or disabled. When using the WebXR API Emulator, this
// gets picked up automatically, however, in the Oculus Browser // gets picked up automatically, however, in the Oculus Browser
// on the Quest, we need to pause and resume the main loop. // on the Quest, we need to pause and resume the main loop.
Browser.pauseAsyncCallbacks();
Browser.mainLoop.pause(); Browser.mainLoop.pause();
window.setTimeout(function () { window.setTimeout(function () {
Browser.resumeAsyncCallbacks();
Browser.mainLoop.resume(); Browser.mainLoop.resume();
}, 0); }, 0);
}, },