Brendan Shanks (@bshanks) commented about dlls/winemac.drv/dllmain.c:
icon_bits = LockResource(icon_res_data); if (icon_bits) { - static const BYTE png_magic[] = { 0x89, 0x50, 0x4e, 0x47 }; + HICON icon;
entry->width = width; entry->height = height; entry->size = icon_dir->idEntries[i].dwBytesInRes;
- if (!memcmp(icon_bits, png_magic, sizeof(png_magic))) + icon = CreateIconFromResourceEx(icon_bits, icon_dir->idEntries[i].dwBytesInRes, + TRUE, 0x00030000, width, height, 0);
I guess I'll defer to whichever way Alexandre wants to go, but even if it works it seems like a bad idea to knowingly give an incorrect length to `CreateIconFromResourceEx` (`dwResSize` is documented as "The size, in bytes, of the set of bits pointed to by the pbIconBits parameter.") -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10036#note_128919