Skip to content
This repository was archived by the owner on Apr 15, 2026. It is now read-only.

Commit b42268e

Browse files
authored
Minimal support for Official Wireless USB Adapter (#61)
Thanks @SammyCola\! Merging this in before archiving the repository.
1 parent dcc05d9 commit b42268e

2 files changed

Lines changed: 9 additions & 0 deletions

File tree

backend/src/api.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,13 @@ pub fn controllers() -> Result<Vec<Controller>> {
147147

148148
controllers.push(controller);
149149
}
150+
(playstation::DS_VENDOR_ID, playstation::DS4_ADAPTER_PRODUCT_ID) => {
151+
debug!("Found new DualShock 4 controller: {:?}", device_info);
152+
let controller =
153+
playstation::parse_dualshock_controller_data(device_info, &hidapi)?;
154+
155+
controllers.push(controller);
156+
}
150157
(playstation::DS_VENDOR_ID, playstation::DS4_NEW_PRODUCT_ID) => {
151158
debug!("Found new DualShock 4 controller: {:?}", device_info);
152159
let controller =

backend/src/api/playstation.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ pub const DS_VENDOR_ID: u16 = 0x054c;
1616
pub const DS4_OLD_PRODUCT_ID: u16 = 0x05c4;
1717
// Dualshock4 product ID changed after playstation update 5.50
1818
pub const DS4_NEW_PRODUCT_ID: u16 = 0x09cc;
19+
// Dualshock4 product ID for the official Wireless USB Adapter
20+
pub const DS4_ADAPTER_PRODUCT_ID: u16 = 0x0ba0;
1921

2022
const DS4_INPUT_REPORT_USB: u8 = 0x01;
2123
const DS4_INPUT_REPORT_USB_SIZE: usize = 64;

0 commit comments

Comments
 (0)