1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-04-20 11:47:46 +00:00

Add XBox/PS5 platform ids

This commit is contained in:
Joshua Goins 2025-03-06 16:26:07 -05:00
parent 1c04657822
commit c9230530a1

View file

@ -62,16 +62,24 @@ pub fn read_version(p: &Path) -> Option<String> {
#[brw(repr = u8)] #[brw(repr = u8)]
#[derive(Clone, Debug, PartialEq)] #[derive(Clone, Debug, PartialEq)]
pub enum Platform { pub enum Platform {
Win32, /// Windows and macOS
PS3, Win32 = 0x0,
PS4, /// Playstation 3
// TODO: confirm if there is a separate PS5, Xbox platform PS3 = 0x1,
/// Playstation 4
PS4 = 0x2,
/// Playstation 5
PS5 = 0x3,
/// Xbox
Xbox = 0x4,
} }
pub fn get_platform_string(id: &Platform) -> &'static str { pub fn get_platform_string(id: &Platform) -> &'static str {
match &id { match &id {
Platform::Win32 => "win32", Platform::Win32 => "win32",
Platform::PS3 => "ps3", Platform::PS3 => "ps3",
Platform::PS4 => "ps4", // TODO: confirm if this "ps4" is correct Platform::PS4 => "ps4",
Platform::PS5 => "ps5",
Platform::Xbox => "lys",
} }
} }