MrTimcakes / Unity-DirectInput

Unity Native Plugin to expose DirectX DirectInput ForceFeedback
GNU Lesser General Public License v3.0
31 stars 11 forks source link

[Help] How to rebind actions across different Directinput devices? #4

Closed human890209 closed 2 years ago

human890209 commented 2 years ago

Hi, I noticed that different DirectInput devices get different layout names. I want to rebind actions across DirectInput devices but filter none-DirectInput layouts such as regular USB Joystick. I used Input's control schemes to do that. But the different layout names of di devices block the rebinding. I change this part to do that. di_device But this will cause input conflicts if 2+ devices are used simultaneously.

human890209 commented 2 years ago

I think 2 DirectInput devices with the same device.productName will also cause conflicts. Is there any way to change the device.productName in Windows?

human890209 commented 2 years ago

I figure it out. di_device rebind

MrTimcakes commented 2 years ago

Aah, this is a decision I battled with and even changed through development. I wanted to be able to address multiple DI devices, but also without specifying the exact GUID so bindings could be made and then used by other devices in the same family. I hoped there would be a way to specify exact devices by their serial which is assigned the GUID, but haven't got round to testing that yet.