do not compile openxrs for wasm32 (#59)

This commit is contained in:
Schmarni
2023-12-15 07:09:07 +01:00
committed by GitHub
parent 265696b07d
commit fcedb9c0c8
2 changed files with 9 additions and 2 deletions

View File

@@ -82,6 +82,8 @@ impl Plugin for OpenXrPlugin {
let mut system_state: SystemState<Query<&RawHandleWrapper, With<PrimaryWindow>>> =
SystemState::new(&mut app.world);
let primary_window = system_state.get(&app.world).get_single().ok().cloned();
#[cfg(not(target_arch = "wasm32"))]
match graphics::initialize_xr_graphics(primary_window.clone()) {
Ok((
device,
@@ -147,6 +149,11 @@ impl Plugin for OpenXrPlugin {
app.insert_resource(XrEnableStatus::Disabled);
}
}
#[cfg(target_arch = "wasm32")]
{
app.add_plugins(RenderPlugin::default());
app.insert_resource(XrEnableStatus::Disabled);
}
}
fn ready(&self, app: &App) -> bool {