win + steamvr and quest working, wivrn still broken

This commit is contained in:
Schmarni
2024-01-24 03:46:20 +01:00
parent bc1985eedd
commit a3c33cb8b6

View File

@@ -31,7 +31,7 @@ use input::XrInput;
use openxr as xr;
// use passthrough::{start_passthrough, supports_passthrough, XrPassthroughLayer};
use resources::*;
use xr::FormFactor;
use xr::{FormFactor, FrameState};
use xr_init::{
xr_only, xr_render_only, CleanupXrData, XrEarlyInitPlugin, XrShouldRender, XrStatus,
};
@@ -119,9 +119,7 @@ impl Plugin for OpenXrPlugin {
PreUpdate,
(
xr_reset_should_render,
apply_deferred,
xr_wait_frame.run_if(xr_only()),
apply_deferred,
locate_views.run_if(xr_only()),
apply_deferred,
)
@@ -284,6 +282,13 @@ pub fn xr_wait_frame(
return;
}
};
#[allow(clippy::erasing_op)]
{
frame_state.predicted_display_time = xr::Time::from_nanos(
frame_state.predicted_display_time.as_nanos()
+ (frame_state.predicted_display_period.as_nanos() * 1),
);
};
info!("Post Frame Wait");
**should_render = frame_state.should_render;
}