Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not start up webvr services when running webxr and vice versa #23902

Merged
merged 1 commit into from Aug 1, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -381,16 +381,20 @@ where
// can't defer it after `create_constellation` has started.
script::init();

if pref!(dom.webxr.enabled) && pref!(dom.webvr.enabled) {
panic!("We don't currently support running both WebVR and WebXR");
}

// For the moment, we enable use both the webxr crate and the rust-webvr crate,
// but we are migrating over to just using webxr.
let mut webxr_main_thread = webxr_api::MainThreadRegistry::new(event_loop_waker)
.expect("Failed to create WebXR device registry");
if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) {
if pref!(dom.webxr.enabled) {
embedder.register_webxr(&mut webxr_main_thread);
}

let mut webvr_heartbeats = Vec::new();
let webvr_services = if pref!(dom.webvr.enabled) || pref!(dom.webxr.enabled) {
let webvr_services = if pref!(dom.webvr.enabled) {
let mut services = VRServiceManager::new();
services.register_defaults();
embedder.register_vr_services(&mut services, &mut webvr_heartbeats);
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.