refactored xr_entry func.
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user