From a7edff6dffffa82105043c9de6c9e695eb503e09 Mon Sep 17 00:00:00 2001 From: 2-3-5-41 <93025618+2-3-5-41@users.noreply.github.com> Date: Mon, 6 Nov 2023 15:15:53 -0500 Subject: [PATCH] refactored `xr_entry` func. --- Cargo.toml | 2 +- src/graphics/mod.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index bab6369..534191e 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,7 +19,7 @@ wgpu-hal = "0.17.1" openxr = { version = "0.17.1", features = ["linked"] } [target.'cfg(not(target_os = "linux"))'.dependencies] -openxr = { version = "0.17.1", features = ["linked", "static"] } +openxr = { version = "0.17.1", features = ["static"] } [dev-dependencies] bevy = "0.12" diff --git a/src/graphics/mod.rs b/src/graphics/mod.rs index 2a0a92d..2eb26dd 100644 --- a/src/graphics/mod.rs +++ b/src/graphics/mod.rs @@ -36,9 +36,9 @@ pub fn initialize_xr_graphics( } pub fn xr_entry() -> xr::Entry { - #[cfg(feature = "linked")] + #[cfg(target_os = "linux")] let entry = xr::Entry::linked(); - #[cfg(not(feature = "linked"))] + #[cfg(not(target_os = "linux"))] let entry = unsafe { xr::Entry::load().unwrap() }; entry }