Ryochan7 / DS4Windows

Like those other ds4tools, but sexier
https://ryochan7.github.io/ds4windows-site/
GNU General Public License v3.0
6.99k stars 807 forks source link

After 3.15 DS4W does not see controller connected through VirtualHere #2610

Closed TheMasterDingo closed 2 years ago

TheMasterDingo commented 2 years ago

I have been using VirtualHere for some time now to connect the controller to my PC. Basically i connect the BT dongle to another computer and through this software it acts as it is connected to the server pc itself. As i said never a problem until 3.15. Windows sees the controller normally but it does not show in DS4Windows. I suspect it has to do with a recent change

"Hardened virtual device check using Nefarius.Utilities.DeviceManagement package. New check detects and skips reWASD created virtual DS4 controllers."

probably it thinks it is a virtual controller or something, is there a way to fix this, maybe a whitelist?

Ryochan7 commented 2 years ago

The new check is likely the culprit. Beforehand, DS4Windows would check the device to see if the UI_Number property was populated and consider it virtual if it was populated. The new check goes up the device stack and tries to detect the enumerator device for the controller. If the enumerator points to ROOT then the DeviceManagement check considers the device to be virtual and DS4Windows will skip it. I would assume VirtualHere has a System device that handles creating fake USB devices on the system so the check will detect the ROOT enumerator being used.

In theory, the DeviceManagement package is doing exactly what it is supposed to do. Not sure if there is an easy way to whitelist VirtualHere created devices.

TheMasterDingo commented 2 years ago

The new check is likely the culprit. Beforehand, DS4Windows would check the device to see if the UI_Number property was populated and consider it virtual if it was populated. The new check goes up the device stack and tries to detect the enumerator device for the controller. If the enumerator points to ROOT then the DeviceManagement check considers the device to be virtual and DS4Windows will skip it. I would assume VirtualHere has a System device that handles creating fake USB devices on the system so the check will detect the ROOT enumerator being used.

In theory, the DeviceManagement package is doing exactly what it is supposed to do. Not sure if there is an easy way to whitelist VirtualHere created devices.

Yes i understand, thank you for the explanation. Ill try to compile a version of the DS4W without the new check but with compatibility with the new nefarius driver and rumble.

Kanuan commented 2 years ago

Nefarius is aware of this situation and is thinking on implement a overload so the IsVirtual() function accepts a whitelist

nefarius commented 2 years ago

@TheMasterDingo post the hardware IDs of the virtual USB bus used so I can take them into consideration when making a PR.

TheMasterDingo commented 2 years ago

@TheMasterDingo post the hardware IDs of the virtual USB bus used so I can take them into consideration when making a PR.

Device istance path ROOT\USB\0000 Hardware ID ROOT\VHUSB3HC

Are this enough?

nefarius commented 2 years ago

@TheMasterDingo post the hardware IDs of the virtual USB bus used so I can take them into consideration when making a PR.

Device istance path ROOT\USB\0000 Hardware ID ROOT\VHUSB3HC

Are this enough?

That should do it, thanks 👍