Explorar o código

Fix WebXR after changing Emscripten configuration noExitRuntime to false

David Snopek %!s(int64=2) %!d(string=hai) anos
pai
achega
a17e93cec2
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      modules/webxr/native/library_godot_webxr.js

+ 3 - 1
modules/webxr/native/library_godot_webxr.js

@@ -28,7 +28,7 @@
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.                */
 /*************************************************************************/
 /*************************************************************************/
 const GodotWebXR = {
 const GodotWebXR = {
-	$GodotWebXR__deps: ['$Browser', '$GL', '$GodotRuntime'],
+	$GodotWebXR__deps: ['$Browser', '$GL', '$GodotRuntime', '$runtimeKeepalivePush', '$runtimeKeepalivePop'],
 	$GodotWebXR: {
 	$GodotWebXR: {
 		gl: null,
 		gl: null,
 
 
@@ -69,7 +69,9 @@ const GodotWebXR = {
 			// 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.mainLoop.pause();
 			Browser.mainLoop.pause();
+			runtimeKeepalivePush(); // eslint-disable-line no-undef
 			window.setTimeout(function () {
 			window.setTimeout(function () {
+				runtimeKeepalivePop(); // eslint-disable-line no-undef
 				Browser.mainLoop.resume();
 				Browser.mainLoop.resume();
 			}, 0);
 			}, 0);
 		},
 		},