Skip to content

Commit 1d5b011

Browse files
authored
Add OperatingSystem::is_mac (#7122)
* Part of #7120
1 parent cbd9c60 commit 1d5b011

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/egui/src/os.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,4 +76,9 @@ impl OperatingSystem {
7676
Self::Unknown
7777
}
7878
}
79+
80+
/// Are we either macOS or iOS?
81+
pub fn is_mac(&self) -> bool {
82+
matches!(self, Self::Mac | Self::IOS)
83+
}
7984
}

0 commit comments

Comments
 (0)