fix(wayland): fix panic when an app requests presentation_feedback without having bound a display
Signed-off-by: Schmarni <marnistromer@gmail.com>
This commit is contained in:
12
src/main.rs
12
src/main.rs
@@ -476,12 +476,6 @@ fn cam_settings(
|
||||
}
|
||||
|
||||
fn xr_step(world: &mut World) {
|
||||
// update things like the Xr input methods
|
||||
world.run_schedule(PreFrameWait);
|
||||
input::process_input();
|
||||
let time = world.resource::<bevy::prelude::Time>().delta_secs_f64();
|
||||
nodes::root::Root::send_frame_events(time);
|
||||
|
||||
// we are targeting the frame after the wait
|
||||
if let Some(mut state) = world.get_resource_mut::<OxrFrameState>() {
|
||||
state.predicted_display_time = openxr::Time::from_nanos(
|
||||
@@ -489,6 +483,12 @@ fn xr_step(world: &mut World) {
|
||||
);
|
||||
}
|
||||
|
||||
// update things like the Xr input methods
|
||||
world.run_schedule(PreFrameWait);
|
||||
input::process_input();
|
||||
let time = world.resource::<bevy::prelude::Time>().delta_secs_f64();
|
||||
nodes::root::Root::send_frame_events(time);
|
||||
|
||||
let should_wait = world
|
||||
.run_system_cached(should_run_frame_loop)
|
||||
.unwrap_or(false);
|
||||
|
||||
Reference in New Issue
Block a user