From 39e022e01c958e6fe56fe5220a146e4774333376 Mon Sep 17 00:00:00 2001 From: David Snopek Date: Mon, 25 Jan 2021 08:35:26 -0600 Subject: Support mono devices in WebXR --- modules/webxr/webxr_interface_js.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'modules/webxr/webxr_interface_js.cpp') diff --git a/modules/webxr/webxr_interface_js.cpp b/modules/webxr/webxr_interface_js.cpp index 6594553146..7cfaf31495 100644 --- a/modules/webxr/webxr_interface_js.cpp +++ b/modules/webxr/webxr_interface_js.cpp @@ -197,12 +197,11 @@ StringName WebXRInterfaceJS::get_name() const { }; int WebXRInterfaceJS::get_capabilities() const { - return XRInterface::XR_STEREO; + return XRInterface::XR_STEREO | XRInterface::XR_MONO; }; bool WebXRInterfaceJS::is_stereo() { - // @todo WebXR can be mono! So, how do we know? Count the views in the frame? - return true; + return godot_webxr_get_view_count() == 2; }; bool WebXRInterfaceJS::is_initialized() const { -- cgit v1.2.3