change back to using "linked" feature cfg.

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

View File

@@ -4,7 +4,8 @@ version = "0.1.0"
edition = "2021"
[features]
default = ["openxr/mint"]
default = ["openxr/mint", "linked"]
linked = ["openxr/linked"]
[dependencies]
anyhow = "1.0.75"
@@ -16,7 +17,7 @@ wgpu-core = { version = "0.17.1", features = ["vulkan"] }
wgpu-hal = "0.17.1"
[target.'cfg( target_os = "linux" )'.dependencies]
openxr = { version = "0.17.1", features = ["linked"] }
openxr = "0.17.1"
[target.'cfg(not(target_os = "linux"))'.dependencies]
openxr = { version = "0.17.1", features = ["static"] }

View File

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