stride icon indicating copy to clipboard operation
stride copied to clipboard

XInput: Get rid of Microsoft.Management.Infrastructure

Open xen2 opened this issue 1 month ago • 1 comments

Is your feature request related to a problem? Please describe.

We use Microsoft.Management.Infrastructure to query various HW details However, this library is not actively maintained. Also, even when running within .NET Core , it requires .NET Framework to be installed (I think this is the only reason why we still have .NET Framework as an installer prerequisite).

We got rid of most of its uses already, however it is still needed for XInput. Probably we could find a way to rewrite the code without it being needed.

Describe the solution you'd like

Find an alternative library and replace our code.

xen2 avatar Nov 16 '25 11:11 xen2

I have actually looked into replacing Input in Stride due to a requirement that SDL didnt provide for me. You could use HIDDevices it had all of the functionality I needed and seemed to work well without specific platform dependancies which was a huge bonus. The reason I needed it was because I wanted the controller to be registered even when the app was in the background to handle shortcuts.

I put it into a usable library already. Although I think I had a bug with how I implemented SharpHook (The library I was testing out for keyboard and mouse) where it would not properly end the running thread. https://github.com/Doprez/Doprez.Stride.MoreInput

Im not sure how the querying of general HW is compared to Microsoft.Management.Infrastructure but in terms of finding valid controllers/gamepads it was pretty useful.

Doprez avatar Nov 21 '25 14:11 Doprez