Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions backend/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,13 @@ pub fn controllers() -> Result<Vec<Controller>> {

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 =
Expand Down
2 changes: 2 additions & 0 deletions backend/src/api/playstation.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down