cursoricon.c:1039: Test failed: Overlaying Mask 0 on Color 00A0B0C0 with DrawIcon. Expected 00003163 (modern), or 00003868 (legacy). Got 000020B8 from line 1109 cursoricon.c:1039: Test failed: Overlaying Mask 1 on Color 00A0B0C0 with DrawIcon. Expected 00FFCE9C (modern), or 00FFD0A0 (legacy). Got 00FFE850 from line 1110 cursoricon.c:1039: Test failed: Overlaying Mask 0 on Color FFA0B0C0 with DrawIcon. Expected 00003163 (modern), or 00003868 (legacy). Got 000020B8 from line 1112 cursoricon.c:1039: Test failed: Overlaying Mask 1 on Color FFA0B0C0 with DrawIcon. Expected 00FFCE9C (modern), or 00FFD0A0 (legacy). Got 00FFE850 from line 1113 cursoricon.c:1039: Test failed: Overlaying Mask 0 on Color 80A0B0C0 with DrawIcon. Expected 00003163 (modern), or 00003868 (legacy). Got 000020B8 from line 1114 cursoricon.c:1039: Test failed: Overlaying Mask 1 on Color 80A0B0C0 with DrawIcon. Expected 00FFCE9C (modern), or 00FFD0A0 (legacy). Got 00FFE850 from line 1115 cursoricon.c:1171: Test failed: Overlaying Mask 0 on Color 00A0B0C0 with DrawIconEx flags 00000003. Expected 00003163 (modern) or 00003868 (legacy). Got 000020B8 from line 1256 cursoricon.c:1171: Test failed: Overlaying Mask 1 on Color 00A0B0C0 with DrawIconEx flags 00000003. Expected 00FFCE9C (modern) or 00FFD0A0 (legacy). Got 00FFE850 from line 1257 cursoricon.c:1171: Test failed: Overlaying Mask 0 on Color FFA0B0C0 with DrawIconEx flags 00000003. Expected 00003163 (modern) or 00003868 (legacy). Got 000020B8 from line 1259 cursoricon.c:1171: Test failed: Overlaying Mask 1 on Color FFA0B0C0 with DrawIconEx flags 00000003. Expected 00FFCE9C (modern) or 00FFD0A0 (legacy). Got 00FFE850 from line 1260 cursoricon.c:1171: Test failed: Overlaying Mask 0 on Color 80A0B0C0 with DrawIconEx flags 00000003. Expected 00003163 (modern) or 00003868 (legacy). Got 000020B8 from line 1261 cursoricon.c:1171: Test failed: Overlaying Mask 1 on Color 80A0B0C0 with DrawIconEx flags 00000003. Expected 00FFCE9C (modern) or 00FFD0A0 (legacy). Got 00FFE850 from line 1262
I've tracked down the problems with an NT4 VM. The problem comes when screen depth is set to less than 32-bit. Even though I'm drawing from an icon made from 32-bit bitmaps, and making DrawIcon draw to a 32-bit DIB section, old versions of windows don't respect that, and will truncate the color data. In 16-bit only the top 5 bits of a color channels emerge ungarbled, and in 8-bit and less, the colors go via the palette (logical palette?), which knocks them completely off.
The most obvious solution would be something like this as a color test:
const int screen_bpp = GetDeviceCaps(hdc, BITSPIXEL);
ok (result == modern_expected || /* Windows 2000 and up */ broken(result == legacy_expected) || /* Windows NT 4.0, 9X and below */ broken((result & 0x00F8F8F8) == (legacy_expected & 0x00F8F8F8) && screen_bpp == 16) || broken(result != legacy_expected && screen_bpp <= 8),
How acceptable would that be?