refactored xr_entry func.

This commit is contained in:
2-3-5-41
2023-11-06 15:15:53 -05:00
parent 4d71663c9f
commit a7edff6dff
2 changed files with 3 additions and 3 deletions

View File

@@ -19,7 +19,7 @@ wgpu-hal = "0.17.1"
openxr = { version = "0.17.1", features = ["linked"] } openxr = { version = "0.17.1", features = ["linked"] }
[target.'cfg(not(target_os = "linux"))'.dependencies] [target.'cfg(not(target_os = "linux"))'.dependencies]
openxr = { version = "0.17.1", features = ["linked", "static"] } openxr = { version = "0.17.1", features = ["static"] }
[dev-dependencies] [dev-dependencies]
bevy = "0.12" bevy = "0.12"

View File

@@ -36,9 +36,9 @@ pub fn initialize_xr_graphics(
} }
pub fn xr_entry() -> xr::Entry { pub fn xr_entry() -> xr::Entry {
#[cfg(feature = "linked")] #[cfg(target_os = "linux")]
let entry = xr::Entry::linked(); let entry = xr::Entry::linked();
#[cfg(not(feature = "linked"))] #[cfg(not(target_os = "linux"))]
let entry = unsafe { xr::Entry::load().unwrap() }; let entry = unsafe { xr::Entry::load().unwrap() };
entry entry
} }