From c9230530a1e22ea5053e3e351284cd1c758375db Mon Sep 17 00:00:00 2001 From: Joshua Goins Date: Thu, 6 Mar 2025 16:26:07 -0500 Subject: [PATCH] Add XBox/PS5 platform ids --- src/common.rs | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/common.rs b/src/common.rs index eb0971f..7b43ed4 100755 --- a/src/common.rs +++ b/src/common.rs @@ -62,16 +62,24 @@ pub fn read_version(p: &Path) -> Option { #[brw(repr = u8)] #[derive(Clone, Debug, PartialEq)] pub enum Platform { - Win32, - PS3, - PS4, - // TODO: confirm if there is a separate PS5, Xbox platform + /// Windows and macOS + Win32 = 0x0, + /// Playstation 3 + PS3 = 0x1, + /// Playstation 4 + PS4 = 0x2, + /// Playstation 5 + PS5 = 0x3, + /// Xbox + Xbox = 0x4, } pub fn get_platform_string(id: &Platform) -> &'static str { match &id { Platform::Win32 => "win32", Platform::PS3 => "ps3", - Platform::PS4 => "ps4", // TODO: confirm if this "ps4" is correct + Platform::PS4 => "ps4", + Platform::PS5 => "ps5", + Platform::Xbox => "lys", } }