summaryrefslogtreecommitdiff
path: root/modules/webxr/native
diff options
context:
space:
mode:
authorDavid Snopek <dsnopek@gmail.com>2022-11-10 14:38:01 -0600
committerDavid Snopek <dsnopek@gmail.com>2022-11-10 16:10:47 -0600
commita17e93cec24fcb33a10341e864be08867b6f8608 (patch)
tree48e7b7ce1dd2f7e98af39f577a84e581bc906f1b /modules/webxr/native
parentd2bd8e5289d67d94ab9c087a6308eaebd4eea91a (diff)
Fix WebXR after changing Emscripten configuration noExitRuntime to false
Diffstat (limited to 'modules/webxr/native')
-rw-r--r--modules/webxr/native/library_godot_webxr.js4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/webxr/native/library_godot_webxr.js b/modules/webxr/native/library_godot_webxr.js
index c476a54c59..714768347c 100644
--- a/modules/webxr/native/library_godot_webxr.js
+++ b/modules/webxr/native/library_godot_webxr.js
@@ -28,7 +28,7 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
const GodotWebXR = {
- $GodotWebXR__deps: ['$Browser', '$GL', '$GodotRuntime'],
+ $GodotWebXR__deps: ['$Browser', '$GL', '$GodotRuntime', '$runtimeKeepalivePush', '$runtimeKeepalivePop'],
$GodotWebXR: {
gl: null,
@@ -69,7 +69,9 @@ const GodotWebXR = {
// gets picked up automatically, however, in the Oculus Browser
// on the Quest, we need to pause and resume the main loop.
Browser.mainLoop.pause();
+ runtimeKeepalivePush(); // eslint-disable-line no-undef
window.setTimeout(function () {
+ runtimeKeepalivePop(); // eslint-disable-line no-undef
Browser.mainLoop.resume();
}, 0);
},