win + steamvr and quest working, wivrn still broken
This commit is contained in:
11
src/lib.rs
11
src/lib.rs
@@ -31,7 +31,7 @@ use input::XrInput;
|
|||||||
use openxr as xr;
|
use openxr as xr;
|
||||||
// use passthrough::{start_passthrough, supports_passthrough, XrPassthroughLayer};
|
// use passthrough::{start_passthrough, supports_passthrough, XrPassthroughLayer};
|
||||||
use resources::*;
|
use resources::*;
|
||||||
use xr::FormFactor;
|
use xr::{FormFactor, FrameState};
|
||||||
use xr_init::{
|
use xr_init::{
|
||||||
xr_only, xr_render_only, CleanupXrData, XrEarlyInitPlugin, XrShouldRender, XrStatus,
|
xr_only, xr_render_only, CleanupXrData, XrEarlyInitPlugin, XrShouldRender, XrStatus,
|
||||||
};
|
};
|
||||||
@@ -119,9 +119,7 @@ impl Plugin for OpenXrPlugin {
|
|||||||
PreUpdate,
|
PreUpdate,
|
||||||
(
|
(
|
||||||
xr_reset_should_render,
|
xr_reset_should_render,
|
||||||
apply_deferred,
|
|
||||||
xr_wait_frame.run_if(xr_only()),
|
xr_wait_frame.run_if(xr_only()),
|
||||||
apply_deferred,
|
|
||||||
locate_views.run_if(xr_only()),
|
locate_views.run_if(xr_only()),
|
||||||
apply_deferred,
|
apply_deferred,
|
||||||
)
|
)
|
||||||
@@ -284,6 +282,13 @@ pub fn xr_wait_frame(
|
|||||||
return;
|
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");
|
info!("Post Frame Wait");
|
||||||
**should_render = frame_state.should_render;
|
**should_render = frame_state.should_render;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user