5 Feb
2024
5 Feb
'24
2:32 a.m.
On Mon Feb 5 02:12:39 2024 +0000, Zhiyi Zhang wrote:
Let's set desc->NumAdapters to zero as well when failure occurs. If MS docs are trustworthy here, we don't have to do this:
If D3DKMT_ENUMADAPTERS2 returns an error, NumAdapters is undefined.
From my observations, Windows does not touch this value when returning `STATUS_BUFFER_TOO_SMALL`, but it's not easy to provoke other errors so I don't know what would be in `NumAdapters` if e.g. the OS ran out of memory or enumeration failed for some other reason.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/4857#note_60004