On Fri Feb 2 22:42:59 2024 +0000, Krzysztof Bogacki wrote:
changed this line in [version 6 of the diff](/wine/wine/-/merge_requests/4857/diffs?diff_id=97527&start_sha=3a9937dd0dddba48eec28c1e2afa4a32c11fd582#85770a8b187bd82db4dbb9a2b8a5f34616049d0f_6710_6699)
Good point. `struct gpu` now has a `unsigned int adapter_count;` member with the number of adapters that have matching `gpu_luid`. In order to make it possible to construct the entire `struct gpu` in one go, I've moved the code that does it below adapter and monitor initialization in `update_display_cache_from_registry`.
An alternative would be to instead search matching GPUs when adding adapters and bumping their `adapter_count` there but that would make my changes less… self-contained.
(I also took the opportunity to reorder assignments above to match the order of members in the struct.)