Rémi Bernon (@rbernon) commented about dlls/dinput/joystick_hid.c:
LOWORD(vidpid), HIWORD(vidpid), index ); RegSetKeyValueW( root, buffer, L"GUID", REG_BINARY, (BYTE *)&entry->instance.guidInstance, sizeof(entry->instance.guidInstance) ); + if (wcslen( entry->path )) + { + if (entry->joy_id == JOY_ID_UNASSIGNED) get_next_available_joy_id( &entry->joy_id ); + if (entry->joy_id == JOY_ID_EMPTY) RegDeleteKeyValueW( root, buffer, L"Joystick Id" ); + else RegSetKeyValueW( root, buffer, L"Joystick Id", REG_BINARY, (BYTE *)&entry->joy_id, + sizeof(entry->joy_id) ); + }
Seems weird to do that here. Would be nicer to do that in `insert_cache_entry`/`cache_entry_create`? -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10755#note_137763