Add `OperatingSystem::is_mac` (#7122)

* Part of https://github.com/emilk/egui/issues/7120
This commit is contained in:
Emil Ernerfeldt 2025-06-07 18:36:23 +02:00 committed by GitHub
parent cbd9c60399
commit 1d5b011793
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 5 additions and 0 deletions

View File

@ -76,4 +76,9 @@ impl OperatingSystem {
Self::Unknown
}
}
/// Are we either macOS or iOS?
pub fn is_mac(&self) -> bool {
matches!(self, Self::Mac | Self::IOS)
}
}