From ccbd773ceecc3d9645400d1f0195b5f925414568 Mon Sep 17 00:00:00 2001 From: Schmarni Date: Fri, 31 Oct 2025 04:00:23 +0100 Subject: [PATCH] fix: gate bevy-dmabuf plugin behind wayland Signed-off-by: Schmarni --- src/main.rs | 7 +++++-- src/nodes/drawable/model.rs | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 07a1c5c..110e175 100644 --- a/src/main.rs +++ b/src/main.rs @@ -312,8 +312,11 @@ fn bevy_loop( // .add(AnimationPlugin) .add(AudioPlugin::default()) .add(GizmoPlugin) - .add(WindowPlugin::default()) - .add(DmabufImportPlugin); + .add(WindowPlugin::default()); + #[cfg(feature = "wayland")] + { + plugins = plugins.add(DmabufImportPlugin); + } let mut task_pool_plugin = TaskPoolPlugin::default(); // make tokio work let handle = tokio::runtime::Handle::current(); diff --git a/src/nodes/drawable/model.rs b/src/nodes/drawable/model.rs index ebb0d01..1dcd930 100644 --- a/src/nodes/drawable/model.rs +++ b/src/nodes/drawable/model.rs @@ -560,7 +560,7 @@ impl Model { setup_complete_notify: Notify::new(), setup_complete: AtomicBool::new(false), }); - model.spatial.bounding_box_calc.set(|n| { + _ = model.spatial.bounding_box_calc.set(|n| { Box::pin(async { if let Ok(model) = n.get_aspect::() && !model.setup_complete.load(Ordering::Relaxed)