Pass AppInfo to OpenXrDiscovery (#32926)

Signed-off-by: Daniel Adams <msub2official@gmail.com>
This commit is contained in:
Daniel Adams 2024-08-03 09:33:45 -10:00 committed by GitHub
parent f3fe11c382
commit bb176514c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 7 additions and 4 deletions

View file

@ -20,7 +20,7 @@ use servo::Servo;
use surfman::GLApi;
use webxr::glwindow::GlWindowDiscovery;
#[cfg(target_os = "windows")]
use webxr::openxr::OpenXrDiscovery;
use webxr::openxr::{AppInfo, OpenXrDiscovery};
use winit::event::WindowEvent;
use winit::event_loop::EventLoopWindowTarget;
use winit::window::WindowId;
@ -163,7 +163,10 @@ impl App {
)))
} else if pref!(dom.webxr.openxr.enabled) && !opts::get().headless {
#[cfg(target_os = "windows")]
let openxr = Some(XrDiscovery::OpenXr(OpenXrDiscovery::new(None)));
let openxr = {
let app_info = AppInfo::new("Servoshell", 0, "Servo", 0);
Some(XrDiscovery::OpenXr(OpenXrDiscovery::new(None, app_info)))
};
#[cfg(not(target_os = "windows"))]
let openxr = None;