From 49c577ae043e63f9186aa63b816f9626172e8f37 Mon Sep 17 00:00:00 2001 From: Samantha <19739806+UltimateNova1203@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:16:14 -0500 Subject: [PATCH 1/3] Update playstation.rs Added product ID for Official Wireless USB Adapter --- backend/src/api/playstation.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/backend/src/api/playstation.rs b/backend/src/api/playstation.rs index 12295ae..0b134ae 100644 --- a/backend/src/api/playstation.rs +++ b/backend/src/api/playstation.rs @@ -16,6 +16,8 @@ pub const DS_VENDOR_ID: u16 = 0x054c; pub const DS4_OLD_PRODUCT_ID: u16 = 0x05c4; // Dualshock4 product ID changed after playstation update 5.50 pub const DS4_NEW_PRODUCT_ID: u16 = 0x09cc; +// Dualshock4 product ID for the official Wireless USB Adatper +pub const DS4_ADAPTER_PRODUCT_ID: u16 = 0x0ba0; const DS4_INPUT_REPORT_USB: u8 = 0x01; const DS4_INPUT_REPORT_USB_SIZE: usize = 64; From d9473c737872c19c8469e795ef79387ae7233b1d Mon Sep 17 00:00:00 2001 From: Samantha <19739806+UltimateNova1203@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:17:19 -0500 Subject: [PATCH 2/3] Update api.rs Added stub for Official Wireless USB Adapter --- backend/src/api.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/backend/src/api.rs b/backend/src/api.rs index 6001456..5360c76 100644 --- a/backend/src/api.rs +++ b/backend/src/api.rs @@ -147,6 +147,13 @@ pub fn controllers() -> Result> { controllers.push(controller); } + (playstation::DS_VENDOR_ID, playstation::DS4_ADAPTER_PRODUCT_ID) => { + debug!("Found new DualShock 4 controller: {:?}", device_info); + let controller = + playstation::parse_dualshock_controller_data(device_info, &hidapi)?; + + controllers.push(controller); + } (playstation::DS_VENDOR_ID, playstation::DS4_NEW_PRODUCT_ID) => { debug!("Found new DualShock 4 controller: {:?}", device_info); let controller = From fe13eedd2ea7c4b4e1760fb64489f376dcc8d6cd Mon Sep 17 00:00:00 2001 From: Samantha <19739806+UltimateNova1203@users.noreply.github.com> Date: Sat, 22 Feb 2025 15:39:20 -0500 Subject: [PATCH 3/3] Update playstation.rs Comment typo --- backend/src/api/playstation.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/api/playstation.rs b/backend/src/api/playstation.rs index 0b134ae..7eab77e 100644 --- a/backend/src/api/playstation.rs +++ b/backend/src/api/playstation.rs @@ -16,7 +16,7 @@ pub const DS_VENDOR_ID: u16 = 0x054c; pub const DS4_OLD_PRODUCT_ID: u16 = 0x05c4; // Dualshock4 product ID changed after playstation update 5.50 pub const DS4_NEW_PRODUCT_ID: u16 = 0x09cc; -// Dualshock4 product ID for the official Wireless USB Adatper +// Dualshock4 product ID for the official Wireless USB Adapter pub const DS4_ADAPTER_PRODUCT_ID: u16 = 0x0ba0; const DS4_INPUT_REPORT_USB: u8 = 0x01;