UCyborg wrote on 2023-08-31, 21:03:
BTW, maybe a special character before "DWM8And16BitMitigation" word in the registry value turns it off for application? I know I've seen "$" and "~" used in those entries, but haven't looked into their meaning. Obviously you only do that when you know what you're doing since this shim is triggered by application asking for lower color mode. 😀
They get used interchangeably. But none of them disables it.
UCyborg wrote on 2023-08-31, 21:03:
it simply fails to cover the whole screen since switching resolution failed.
The render resolution, 400x300 is a valid enumerated resolution in my driver. With the mitigation enabled, the game scales to 4:3, fullscreen on that resolution. What I can assume is without the mitigation, the window handle fails to scale due to an unspecified mode, plus the game tries to run at whatever lowest it possesses due to unspecified mode again.
UCyborg wrote on 2023-08-31, 21:03:
that shim's basic function seems to be simply making 16-bit and 8-bit color modes available and making them appear correctly in supposedly 32bpp only environment as they're not normally supported since Windows 8.
UCyborg wrote on 2023-08-31, 21:03:
I don't think there's anything for Windows to fix here as it just provides 16bpp or 8bpp environment as necessary, but with the shim off, game is forced in 32bpp in any case that its software renderer wasn't coded to handle right.
The results are contradicting:
I tested frame by frame screenshots. On D3D mode on Windows 11 22H2, the shim just makes video modes containing 8/16-bit color to be enumerated. Except the output color, other characteristics of the appearance is identical, regardless of having the shim enabled or disabled.
16bpp, DWM OFF

16bpp, DWM ON

32bpp, DWM OFF

32bpp, DWM ON

This gives the conclusion that 8/16-bit colours will get converted to 32-bit no matter the shim is present or not... right?
Things take a turn in Software mode. In Software mode, enabling the shim gives a proper 16-bit look to the color. But it doesn't in D3D mode. Cannot say why.
On D3D, I tested the game with DxWnd's 16bpp color emulation, as well as on VMware Windows XP and the colour is clearly differentiable. Plus the screenshot file size also speaks on it. Half-Life D3D doesn't obey the shim:
WinXP, DxWnd 16bpp:

previously known as Discrete_BOB_058