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 = diff --git a/backend/src/api/playstation.rs b/backend/src/api/playstation.rs index 12295ae..7eab77e 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 Adapter +pub const DS4_ADAPTER_PRODUCT_ID: u16 = 0x0ba0; const DS4_INPUT_REPORT_USB: u8 = 0x01; const DS4_INPUT_REPORT_USB_SIZE: usize = 64;