diff options
author | David Snopek <dsnopek@gmail.com> | 2021-01-25 08:35:26 -0600 |
---|---|---|
committer | David Snopek <dsnopek@gmail.com> | 2021-01-25 08:39:50 -0600 |
commit | 39e022e01c958e6fe56fe5220a146e4774333376 (patch) | |
tree | eac241dd9f022dc3a0372c3fdc26cbc5c3dfd396 /modules/webxr/webxr_interface_js.cpp | |
parent | 161c4be9d21f4368e7c8c99b3ea2175c02963ee0 (diff) | |
download | redot-engine-39e022e01c958e6fe56fe5220a146e4774333376.tar.gz |
Support mono devices in WebXR
Diffstat (limited to 'modules/webxr/webxr_interface_js.cpp')
-rw-r--r-- | modules/webxr/webxr_interface_js.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
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 { |