DuoStream / Duo

An HDR-compatible multiseat streaming solution based around RdpWrap, Sunshine, Moonlight, and a variety of custom driver and library patches
352 stars 1 forks source link

[GAMEPAD SUPPORT] Move away from KMDF drivers in favor of UMDF #133

Closed Black-Seraph closed 1 month ago

Black-Seraph commented 1 month ago

Duo has two problems with gamepad support:

  1. It relies on ViGEmBus, a project abandoned by its author.
  2. It has to jump through hoops to jail physical devices into the console session.

Issue number 1 could be solved by implementing a feature-equivalent UMDF-based input driver of our own, as UMDF-based drivers can be self-signed, unlike KMDF-based drivers, which cannot.

Issue number 2 could be solved by implementing a UMDF-based filter driver and building an extensive vendor + product ID list of known physical gamepads, like the input driver mentioned above, as long as we stay within the limitations of UMDF, we can self-sign the driver.

The vendor + product ID list is required because UMDF-based filter drivers aren't allowed to target device classes, but rather need to target devices directly.

I'm not entirely sure how doable the second part is yet, but I know for a fact the first part is as I just did a test-run on a Secure Boot & DSE-enabled test machine.

warlordianx3 commented 1 month ago

Sign me up for testing new features or enhancement

Black-Seraph commented 1 month ago

Sign me up for testing new features or enhancement

It will be a bit before any of this lands in Duo I'm afraid.

chrispable commented 1 month ago

How will you handle vid pid duplicate serials or the Xbox dongle? Admittedly I know nothing how the Xbox dongle works for making game pad devices (do they even make vid/pid/sid entries you can match on?) . Example, I've written input support for applications with homebrew adapters that have the same serial. The work around was to use the device plug port to differentiate it

warlordianx3 commented 1 month ago

I think those duplicate pid or serials causes locking up xbox controls if using Duo's multiple instances.

Black-Seraph commented 1 month ago

I've looked into this a little further, and sadly, the UMDF-based filter drivers will not get us the result we want due to the limitations involved with them.

The UMDF-based virtual gamepad drivers do work, but gamepad support itself isn't our primary concern at the moment.

Sucks, but this wasn't the solution either.