jfernandez / ControllerTools

Game controller plugin for the Steam Deck
GNU General Public License v3.0
49 stars 3 forks source link

Fixes a bug when multiple DS or DS4 controllers are plugged in #17

Closed jfernandez closed 1 year ago

jfernandez commented 1 year ago

When calling hidapi.open(device_info.vendor_id(), device_info.product_id())?;when multiple devices with the same vendor/product ID are connected, hidapi will always return the first one.

The correct way to get the device is by calling device_info.open_device(hidapi)?;. This will use the device path or fallback to using the serial.

closes #15