Skip to content

Commit a9ab5cc

Browse files
author
Zitro
committed
Fix OS conflicts once more
1 parent 4b640be commit a9ab5cc

File tree

1 file changed

+36
-4
lines changed

1 file changed

+36
-4
lines changed

crates/bevy_window/src/window.rs

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -594,9 +594,25 @@ pub struct WindowDescriptor {
594594
pub resize_constraints: WindowResizeConstraints,
595595
pub scale_factor_override: Option<f64>,
596596
pub title: String,
597-
#[cfg(any(feature = "x11", feature = "wayland"))]
597+
#[cfg(all(
598+
any(
599+
target_os = "linux",
600+
target_os = "freebsd",
601+
target_os = "netbsd",
602+
target_os = "openbsd"
603+
),
604+
any(feature = "x11", feature = "wayland")
605+
))]
598606
pub desktop_id: String,
599-
#[cfg(feature = "x11")]
607+
#[cfg(all(
608+
any(
609+
target_os = "linux",
610+
target_os = "freebsd",
611+
target_os = "netbsd",
612+
target_os = "openbsd"
613+
),
614+
feature = "x11"
615+
))]
600616
pub desktop_instance: String,
601617
#[doc(alias = "vsync")]
602618
pub present_mode: PresentMode,
@@ -621,9 +637,25 @@ impl Default for WindowDescriptor {
621637
fn default() -> Self {
622638
WindowDescriptor {
623639
title: "app".to_string(),
624-
#[cfg(any(feature = "x11", feature = "wayland"))]
640+
#[cfg(all(
641+
any(
642+
target_os = "linux",
643+
target_os = "freebsd",
644+
target_os = "netbsd",
645+
target_os = "openbsd"
646+
),
647+
any(feature = "x11", feature = "wayland")
648+
))]
625649
desktop_id: "app".to_string(),
626-
#[cfg(feature = "x11")]
650+
#[cfg(all(
651+
any(
652+
target_os = "linux",
653+
target_os = "freebsd",
654+
target_os = "netbsd",
655+
target_os = "openbsd"
656+
),
657+
feature = "x11"
658+
))]
627659
desktop_instance: "Main".to_string(),
628660
width: 1280.,
629661
height: 720.,

0 commit comments

Comments
 (0)