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:
Schmarni
2025-10-10 21:38:02 +02:00
parent ec871f5963
commit b0ee7e9f54
3 changed files with 14 additions and 17 deletions

View File

@@ -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);