Replies: 10 comments
-
In theory this is possible but it would require some modifications to the XInput back-end that Xidi uses. XInput does not officially expose these Some undocumented functions apparently exist in the XInput library that could be leveraged, as in here. This would at least enable the guide button but it comes with the risk of breaking if the XInput library ever changes going forward. I am not sure about the Share button though. |
Beta Was this translation helpful? Give feedback.
-
HID seems to be one possible way to do so, however, there might be an officially possible way as the API isn't in the not-supported list, but that has to be tested. Either way it'll definitely be lower-level than stock XInput API so yeah, maybe not worth the trouble. This is also quite interesting, apparently there's a kill switch about the triggers in the official API, I haven't been able to get it to work however, even after a reboot. Right now your wrapper works beautifully for WinMM out of the box, so that'll do fine for now! 😀 |
Beta Was this translation helpful? Give feedback.
-
Since we were discussing back-end changes: another option I was reading about is XInputOnGameInput or possibly just GameInput itself. I do not think this would specifically allow support for the Guide and Share buttons though - while it does add XInputSetStateEx for force feedback via the impulse triggers, there does not appear to be an equivalent to the undocumented XInputGetStateEx function. One concern I have with the Guide and Share buttons being mappable in a game is that they are mapped to system-wide functions (at least the Guide button does by invoking the Xbox Game Bar - I don't have hardware with a Share button to know for sure). How would Xidi, or any other application that reads input from Guide and Share for that matter, interact with these system-wide functions? Users (or an app/Xidi) would presumably need to disable the system-level functions. At least for the Guide button, users can change a Game Bar setting to turn off the system-wide function and suddenly DirectInput exposes the guide button as Button 11 without issue. Presumably the undocumented XInput function would do that too. |
Beta Was this translation helpful? Give feedback.
-
Never heard of that API before, but after reading carefully, it's only for console... Just tested both buttons, guide works as usual like you said, but share does absolutely nothing. I've been searching fresh news about that: https://www.theverge.com/2022/2/8/22923287/xbox-share-button-remap-controller-customization-feature https://www.neowin.net/news/you-can-now-use-the-xbox-share-button-feature-on-windows-11-pcs-too Looks like it'll be Windows 11 exclusive, because Microsoft you know... 🤣 |
Beta Was this translation helpful? Give feedback.
-
It seems like the plan is to make GameInput available to desktop apps, which means Xidi could theoretically use it at some point. Out of curiosity, even if it doesn't offer its intended system-wide functionality, does the Share button work via DirectInput? On Windows 10 or 11 if you search the Start menu for "Set up USB game controllers" and then click through to Properties, then press the Share button, does it cause any of the numbered buttons to light up on the Test tab? |
Beta Was this translation helpful? Give feedback.
-
Well that's two good news! Totally forgot about that control panel and yes it has changed:
Hat as usual So, we have the stuff we need and 4 unused slots, don't remember old version but on this one it only updates when the window is focused. Just tried this on no$psx with WINMM:
It works but the other way around, A sends Guide, B sends Share! 🤣 I tried
I tried
|
Beta Was this translation helpful? Give feedback.
-
Good news that Button 12 maps to Share. This confirms that DirectInput applications can certainly see it and might be a good indicator that there are some undocumented flags returned by By the way, that control panel is communicating with the controller without Xidi getting in the way at all. Xidi would need explicit support added for those new buttons. Currently all of its internal data structures completely exclude both Guide and Share. ; Guide button (could theoretically be mapped to anything, below might be what the built-in mapper XInputSharedTriggers would do)
ButtonGuide = Button(11)
; Share button (could theoretically be mapped to anything, below might be what the built-in mapper XInputSharedTriggers would do)
ButtonShare = Button(12) The above is what the configuration might look like were Xidi to have support added for these two additional buttons. However, at the moment Xidi does not know about ButtonGuide or ButtonShare. |
Beta Was this translation helpful? Give feedback.
-
Which means that you'll need to mix both, XInput for separate triggers and DInput for guide/share buttons in that particular case, correct? |
Beta Was this translation helpful? Give feedback.
-
No, ideally everything would come from a single back-end like the undocumented XInput APIs or GameInput. I played around a bit with the undocumented XInput function |
Beta Was this translation helpful? Give feedback.
-
Alright, I'm watching your repository to see what will be in your next release. 😀 |
Beta Was this translation helpful? Give feedback.
-
Any ideas on whether these two extra buttons could be supported as well by Xidi?
Beta Was this translation helpful? Give feedback.
All reactions