Zhiyi Zhang (@zhiyi) commented about dlls/win32u/sysparams.c:
+ if (!adapter->mode_count) continue; + size += sizeof(DEVMODEW) + adapter->modes[0].dmDriverExtra; }
+ /* allocate an extra mode for easier iteration */ + if (!(displays = calloc( 1, size + sizeof(DEVMODEW) ))) goto done; + mode = displays; + + LIST_FOR_EACH_ENTRY(adapter, &adapters, struct adapter, entry) + { + if (!adapter->mode_count) continue; + + mode->dmSize = sizeof(DEVMODEW); + if (devname) + { + if (!wcsicmp( devname, adapter->dev.device_name )) I don't remember if it's from the D3D code. I think curly braces should be added when any of the branches contain more than one line.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/576#note_5636