fixed stuff for steamvr openxr to not crash

This commit is contained in:
MalekiRe
2023-09-09 21:43:06 -07:00
parent 6d60b55b02
commit aca80bade3
4 changed files with 21 additions and 8 deletions

View File

@@ -322,12 +322,18 @@ pub fn locate_views(
xr_frame_state: Res<XrFrameState>,
) {
let _span = info_span!("xr_locate_views").entered();
*views.lock().unwrap() = session
*views.lock().unwrap() = match session
.locate_views(
VIEW_TYPE,
xr_frame_state.lock().unwrap().predicted_display_time,
&input.stage,
)
.unwrap()
{
Ok(this) => this,
Err(err) => {
warn!("error: {}", err);
return;
}
}
.1;
}