With IDirectInput8::EnumDevices, I get GUIDs (in DIDEVICEINSTANCE)
(tested in C# on Windows 10 22H2)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I am using Windows.Gaming.Input.RawGameController to receive input from gamepads, joysticks and similar devices.
https://learn.microsoft.com/en-us/uwp/api/windows.gaming.input.rawgamecontroller?view=winrt-22621
For my application, the input devices are used as "button boxes" or hotkeys. The user can select which action he wants to perform, and then press a button on his gamepad to link that button to that action.
To persist the hotkeys, and to distinguish two similar devices (e.g. two Xbox360 controllers) I need to be able to uniquely identify devices.
For now, I am using the NonRoamableId property, which at least unique identifies a device on the same PC, on the same application:
Unfortunately, as the docs also say: the NonRoamableId does not remain the same between applications.
In my case, I have two applications that need to identify the same controller:
App1 and App2 are both built by me, in the same .NET Solution, but they are different projects, different executables, and simply separate applications in the end.
Is there any way at all for me to identify a device uniquely between when it is used in App1 and App2?
The NonRoamableIds look as follows for the two apps and two controllers:
App1, controller 1: {wgi/nrid/P^8c_LU-?Ci-Rc92m-X>TK-O1gQ>-h;W65QeX}
App1, controller 2: {wgi/nrid/IgJ-C]mORW-`7eT-dHNX?KA-CUg-g;`<=Va-5R}
App2, controller 1: {wgi/nrid/oS?N8;75-01ckAIO-LV<SCT-e8`?F8-OVA;K}
App2, controller 2: {wgi/nrid/b6[S7k->8dW-Y\J-PF[;kC-^7;-?CbWg-`kUb`}
There seems to be nothing in there I can use at all.
Is this simply impossible?
With IDirectInput8::EnumDevices, I get GUIDs (in DIDEVICEINSTANCE)
(tested in C# on Windows 10 22H2)