I'm not completely sure what the expectations are regarding these registry key paths, but @afrantzis said Wayland reports adapters in an arbitrary order and this would let us find the right adapter config and their current settings based on their unique name instead.
Other drivers simply format the numeric ID themselves, though might not be 0-based index anymore.
--
v4: win32u: Rename struct adapter to struct source.
win32u: Use named adapters instead of struct gdi_adapter.
win32u: Use a symlink for the logically indexed adapter config key.
win32u: Split writing adapter to registry to a separate helper.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5137
--
v2: server: Clarify that registry files are always in the current directory, and simplify save_branch().
server: Replace sprintf with snprintf to avoid deprecation warnings on macOS.
server: Replace some malloc/sprintf/strcpy calls with asprintf.
https://gitlab.winehq.org/wine/wine/-/merge_requests/5356