diff --git a/Cargo.toml b/Cargo.toml index d739ec4..828772f 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -53,14 +53,15 @@ opt-level = "s" lto = true codegen-units = 1 panic = "abort" -strip = "symbols" +# strip = "symbols" +debug = true [profile.dev.package."*"] opt-level = 3 [patch.crates-io] -bevy_mod_openxr = { git = "https://github.com/awtterpip/bevy_oxr" } -bevy_mod_xr = { git = "https://github.com/awtterpip/bevy_oxr" } +bevy_mod_openxr = { git = "https://github.com/awtterpip/bevy_oxr", rev = "9fd0c797"} +bevy_mod_xr = { git = "https://github.com/awtterpip/bevy_oxr", rev = "9fd0c797" } bevy_gltf = { git = "https://github.com/Schmarni-Dev/bevy", branch = "gltf_backport" } # TODO: figure out how to not need this horrifing patch wgpu = { git = "https://github.com/Schmarni-Dev/wgpu", branch = "bad_dmabuf_workaround" } diff --git a/src/main.rs b/src/main.rs index 3185f39..9545b84 100644 --- a/src/main.rs +++ b/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::().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::() { 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::().delta_secs_f64(); + nodes::root::Root::send_frame_events(time); + let should_wait = world .run_system_cached(should_run_frame_loop) .unwrap_or(false); diff --git a/src/wayland/core/surface.rs b/src/wayland/core/surface.rs index d5cc3f9..2e1839c 100644 --- a/src/wayland/core/surface.rs +++ b/src/wayland/core/surface.rs @@ -22,7 +22,6 @@ use bevy::{ use bevy_dmabuf::import::ImportedDmatexs; use mint::Vector2; use parking_lot::Mutex; -use waynest_server::Client as _; use std::{ fmt::Display, sync::{Arc, OnceLock, Weak}, @@ -32,6 +31,7 @@ use waynest_protocols::server::{ core::wayland::{wl_output::Transform, wl_surface::*}, stable::presentation_time::wp_presentation_feedback::{Kind, WpPresentationFeedback}, }; +use waynest_server::Client as _; pub static WL_SURFACE_REGISTRY: Registry = Registry::new(); @@ -305,13 +305,9 @@ impl Surface { .drain(..) .collect::>(); for feedback in feedbacks { - feedback - .sync_output( - client, - feedback.0, - client.display().output.get().unwrap().id, - ) - .await?; + if let Some(display_id) = client.display().output.get().map(|display| display.id) { + feedback.sync_output(client, feedback.0, display_id).await?; + } let cycle_lo = refresh_cycle as u32; let cycle_hi = (refresh_cycle >> 32) as u32; feedback