Skip to content

Commit bc73fea

Browse files
authored
Added support for Xbox Elite Wireless Controller Series 2
Added support for Xbox Elite Wireless Controller Series 2
1 parent 7715ca9 commit bc73fea

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

backend/src/api.rs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,10 @@ pub fn controllers() -> Result<Vec<Controller>> {
7474
&& (device_info.product_id() == xbox::XBOX_ONE_S_CONTROLLER_BT_PRODUCT_ID
7575
|| device_info.product_id() == xbox::XBOX_ONE_S_LATEST_FW_PRODUCT_ID
7676
|| device_info.product_id() == xbox::XBOX_WIRELESS_CONTROLLER_USB_PRODUCT_ID
77-
|| device_info.product_id() == xbox::XBOX_WIRELESS_CONTROLLER_BT_PRODUCT_ID)
77+
|| device_info.product_id() == xbox::XBOX_WIRELESS_CONTROLLER_BT_PRODUCT_ID
78+
|| device_info.product_id() == xbox::XBOX_WIRELESS_ELITE_CONTROLLER_USB_PRODUCT_ID
79+
|| device_info.product_id() == xbox::XBOX_WIRELESS_ELITE_CONTROLLER_BT_PRODUCT_ID
80+
|| device_info.product_id() == xbox::XBOX_WIRELESS_ELITE_CONTROLLER_BTLE_PRODUCT_ID)
7881
})
7982
.collect();
8083
xbox_controllers.dedup_by(|a, b| a.serial_number() == b.serial_number());
@@ -96,6 +99,16 @@ pub fn controllers() -> Result<Vec<Controller>> {
9699
let controller = xbox::parse_xbox_controller_data(device_info, &hidapi)?;
97100
controllers.push(controller);
98101
}
102+
(xbox::MS_VENDOR_ID, xbox::XBOX_WIRELESS_ELITE_CONTROLLER_BT_PRODUCT_ID) => {
103+
debug!("Found Xbox Elite 2 controller: {:?}", device_info);
104+
let controller = xbox::parse_xbox_controller_data(device_info, &hidapi)?;
105+
controllers.push(controller);
106+
}
107+
(xbox::MS_VENDOR_ID, xbox::XBOX_WIRELESS_ELITE_CONTROLLER_BTLE_PRODUCT_ID) => {
108+
debug!("Found Xbox Elite 2 controller: {:?}", device_info);
109+
let controller = xbox::parse_xbox_controller_data(device_info, &hidapi)?;
110+
controllers.push(controller);
111+
}
99112
_ => {}
100113
}
101114
}

0 commit comments

Comments
 (0)