We can do it the way you describe, but I guess my concern with that is why go through the second step if we're just going to end up potentially overwriting it all in step 4. Maybe that makes sense when joystick ID is taken into account, but I'm not sure I get the logic there.
Because there might be entries in the registry that aren't yet in the local cache -because populated by another process- and also not physically present anymore but that we still want to keep for when the devices are plugged back again?
`EnumDevices()` on native sorts by the first time a particular `DeviceInstance` was created, I'm guessing it uses the registry entry creation time in `HKLM\System\CurrentControlSet\Enum`. That sorting can be done on the local list, which was my plan to do later in a separate patch.
I think we could use the instance GUID first 8 bytes as UINT64? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10364#note_135676