From ceb67e6bc3763225d7e67c5c21106409fa0112d3 Mon Sep 17 00:00:00 2001 From: Mike Hsu Date: Thu, 1 Feb 2024 20:57:09 -0800 Subject: [PATCH] only set non send marker on ios and macos --- crates/bevy_render/src/view/window/mod.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/bevy_render/src/view/window/mod.rs b/crates/bevy_render/src/view/window/mod.rs index b25957dcc4310..7f0e7d2f61a76 100644 --- a/crates/bevy_render/src/view/window/mod.rs +++ b/crates/bevy_render/src/view/window/mod.rs @@ -42,7 +42,6 @@ impl Plugin for WindowRenderPlugin { render_app .init_resource::() .init_resource::() - .init_non_send_resource::() .add_systems(ExtractSchedule, extract_windows) .add_systems(Render, prepare_windows.in_set(RenderSet::ManageViews)); } @@ -238,8 +237,8 @@ impl WindowSurfaces { #[allow(clippy::too_many_arguments)] pub fn prepare_windows( // By accessing a NonSend resource, we tell the scheduler to put this system on the main thread, - // which is necessary for some OS s - _marker: NonSend, + // which is necessary for some OS's + #[cfg(any(target_os = "macos", target_os = "ios"))] _marker: Option>, mut windows: ResMut, mut window_surfaces: ResMut, render_device: Res,