Skip to content

Commit

Permalink
only set non send marker on ios and macos
Browse files Browse the repository at this point in the history
  • Loading branch information
hymm committed Feb 2, 2024
1 parent e3126a4 commit ceb67e6
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crates/bevy_render/src/view/window/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ impl Plugin for WindowRenderPlugin {
render_app
.init_resource::<ExtractedWindows>()
.init_resource::<WindowSurfaces>()
.init_non_send_resource::<NonSendMarker>()
.add_systems(ExtractSchedule, extract_windows)
.add_systems(Render, prepare_windows.in_set(RenderSet::ManageViews));
}
Expand Down Expand Up @@ -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<NonSendMarker>,
// which is necessary for some OS's
#[cfg(any(target_os = "macos", target_os = "ios"))] _marker: Option<NonSend<NonSendMarker>>,
mut windows: ResMut<ExtractedWindows>,
mut window_surfaces: ResMut<WindowSurfaces>,
render_device: Res<RenderDevice>,
Expand Down

0 comments on commit ceb67e6

Please sign in to comment.