Open bitinn opened 6 years ago
That's a tricky problem you're trying to solve, but it turns out I'm a sucker for trying to get Windows to do things with controller input that it's normally not supposed to do (or where its design flaws prevent it from working correctly). So I can help!
I've made a proxy dll in the past that overrides the normal behavior for Xinput and prevents any app that uses it from detecting the home / guide button is being pressed. I originally made it to prevent Steam from taking over the guide button as it used to lack any sort of setting for disabling that. It's real easy to change the dll to prevent an app from being able to use Xinput at all.
Here's a link to it: https://www.dropbox.com/s/2edqhn1ixw8s3at/disable_xinput.zip?dl=0
Unzip those two dlls and put them in the same folder as Steam.exe (usually C:\Programs Files\Steam\, but it depends on where your Steam installation is.) That will prevent it from being able to read any Xinput controllers.
However, there's a number of things that may stop this from working that you should look into:
First, have you confirmed that when you map your Xinput Shield controller to vJoy using xboxToVJoy, pressing the home button is detectable? You can test this by pressing Win+R to open the "Run" dialog, enter joy.cpl, and then press OK. That should open up the Game Controllers control panel, where you can select the first vJoy device and make sure one of its buttons activates when you press the home button on your shield controller. If that works then you can move forward with this plan, but if it doesn't happen then that means that the shield doesn't translate home button presses to Xinput and you're embarking on a fool's errand! (I find it's always good to check these sorts of things before investing a lot of time in complicated solutions.)
With that out of the way, the next question is, do you need to prevent Steam and only Steam from receiving Xinput? If so, then go ahead and use that dll from the above link. However, it sounds like you'll need the games you're playing to receive Xinput input as well, in which case I'm not sure how you're going to get around the double input issue there. I'm not sure exactly how Steam translates input from a generic controller into something an ordinary game that uses Xinput can receive, but it probably uses a similar trick as overriding the Xinput dlls. It's certainly worth trying though.
Finally, be aware this may introduce some input lag, as your input is making several jumps: NVIDIA Shield -> your local network -> your gaming PC -> xboxToVJoy -> vJoy -> Steam -> the game you're actually playing. Ordinarily it just goes from your controller directly to the game.
Best of luck with this! I'll be curious to hear if you manage to get this working.
Fabulous! I will look into your files and suggestions when I am back to my desk tomorrow.
@briankendall
So, I have given this a shot and these are my observations:
Controller is detected as Nvidia controller but installed as an Xbox 360 controller, using generic Microsoft drivers (Nvidia used to ship a controller driver within Nvidia card drivers, but I am no longer able to find them in newer releases...)
joy.cpl detects it but gives a blank Test page, and greys out the Calibrate button, unlike other controllers.
xboxToVJoy can detects this controller occasionally. When it does I use vjoy's own monitor to detect inputs. I have set a virtual device with 20-button, 1 POV, with ALL axes enabled just in case. I am able to detect all buttons/sticks/triggers on the Shield controller, except the Nvidia button and the Home button.
Steam detects Shield Controller as an Xbox One controller. Nvidia button works with Steam to bring up its own interface. Home button appears to do nothing.
Steam detects Shield Controller as an generic gamepad, and allow layout remap. All inputs, including Nvidia button and Home button, are detectable and remappable.
One strange thing is these 2 buttons are detected as Button 15 and 16, so it skips a few numbers for reasons I don't understand.
GameStream's virtual controller is not listed in Windows device manager or joy.cpl.
However, xboxToVJoy now detects the controller very reliably.
I have tested with the same vjoy virtual device, all buttons are detectable, except Nvidia button and Home button. I believe they are simply not sent via GameStream as one is binded to Shield TV Voice Search and the other is binded to Shield TV Homescreen.
Steam see both controllers and takes input from both as usual. Nvidia button no longer brings up Steam interface.
What I did before your reply yesterday was to disable Steam's Base Configuration for the GameStream's controller instead, so Steam only response to vjoy device's input, which sort of works.
I was sacrificing my "Back" button in place for the "Guide" button. Given I am streaming to a PC, games also maps "Y" or "B" or "LT/RT" button to their back/cancel function anyway ;-)
Let me know if there are other info I can provide. And if you manage to test those DLLs, do share! Thx!
Was informed that HidGuardian is EOL-ed and HidHide is perhaps a couple months away from its first public release. See here and here for ViGEm team's @nefarius's posts alluding to an imminent release. HidHide will be replacing HidGuardian and--most notably--will be adding support for hiding XInput controllers.
Good tip! I've got some cases where hiding XInput controllers is needed. I'm also curious about HIDHide and the techniques it uses, as it may very well be a superior method to the DLL overriding method I'm using with devreorder.
Hi Brian,
I am trying to use xboxToVJoy to expose an xinput controller as directinput to Steam, so that I can enable layout remap.
While it works, I run into the problem of double input, as Steam take inputs from both my controller and vjoy controller.
So I want to hide the xinput controller from Steam, but am unsure if it's possible. Do you happen to know any solution?
(The reason I jump through these loops: I am trying to make Nvidia GameStream works better with Steam. GameStream exposes the remote controller as an Xbox controller, but the Shield controller is different from Xbox controller, so I want to expose it as a generic gamepad to allow Steam to remap buttons... More info at Nvidia forum if you want to look into it)
Many thx!