mirror of https://github.com/wayvr-org/wayvr.git
test playspace offset availability
This commit is contained in:
parent
3d39e34316
commit
c82b0f0d09
|
|
@ -95,6 +95,11 @@ pub fn openxr_run(
|
|||
app.monado_state_init();
|
||||
|
||||
let mut space_mover = playspace::PlayspaceMover::new();
|
||||
if let Some(m) = app.monado_state.as_mut() {
|
||||
// Test whether current playspace offset can be queried and log an error if it fails.
|
||||
// `space_mover` can be used regardless and will start working if the playspace offset becomes available later.
|
||||
space_mover.test_availability(&mut m.ipc);
|
||||
};
|
||||
|
||||
let mut blocker = app
|
||||
.monado_state
|
||||
|
|
|
|||
|
|
@ -244,6 +244,12 @@ impl PlayspaceMover {
|
|||
.set_reference_space_offset(ReferenceSpaceType::Stage, pose)
|
||||
.inspect_err(|e| log::warn!("Could not fix floor due to libmonado error: {e:?}"));
|
||||
}
|
||||
|
||||
pub fn test_availability(&mut self, monado: &mut Monado) {
|
||||
let _ = monado
|
||||
.get_reference_space_offset(ReferenceSpaceType::Stage)
|
||||
.log_err("Space drag may not be available");
|
||||
}
|
||||
}
|
||||
|
||||
fn get_offset(monado: &mut Monado) -> Result<Affine3A, libmonado::MndResult> {
|
||||
|
|
|
|||
Loading…
Reference in New Issue