On Thu Nov 28 21:54:29 2024 +0000, Paul Gofman wrote:
That looks like exactly what I tried to describe as what I think is essential Windows behaviour: yes, on first device plug ever it may take any unused index, but then the id sticks to the index stored somewhere for this device.
I pushed some reworked tests there: https://gitlab.winehq.org/rbernon/wine/-/commits/mr/dinput-test-ids, the ID cache is in the registry. Removing the key resets the cache and makes it work every time. There was some registry cleanup already, but it was only removing the VID/PID used in every test, and assumed there was only going to be one.