#[derive(Debug, Clone, PartialEq, Default)]
pub enum Platform {
#[default]
Windows,
Android,
SteamDeck,
SteamLinux,
MacOS,
}
impl Platform {
pub fn as_str(&self) -> &'static str {
match self {
Platform::Windows => "windows",
Platform::Android => "android",
Platform::SteamDeck => "steam-deck",
Platform::SteamLinux => "steam-linux",
Platform::MacOS => "macos",
}
}
pub fn is_mobile(&self) -> bool {
matches!(self, Platform::Android)
}
pub fn is_small(&self) -> bool {
matches!(self, Platform::SteamDeck)
}
pub fn is_desktop(&self) -> bool {
!self.is_mobile() && !self.is_small()
}
}