On Mon Apr 27 16:34:24 2026 +0000, Rémi Bernon wrote:
Seems weird to do that here. Would be nicer to do that in `insert_cache_entry`/`cache_entry_create`? It does seem odd but I can't really come up with a better place to do it. Basically, what needs to happen is:
- We load all preexisting `Joystick Id` values from the registry, marking the ones that are in use. - Now that we know which are in use, we can assign any available joystick IDs to devices that don't have one yet. If we try to do this in `insert_cache_entry` or `cache_entry_create`, it's possible we assign a joystick ID that conflicts with one that's already in the registry. So we need to first enumerate all devices, and then assign afterwards. This seemed like the best place to do that. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10755#note_137999