On Thu Sep 15 07:11:22 2022 +0000, Rémi Bernon wrote:
There's already some tests in sysparams, though they aren't really making it obvious how Windows and this is supposed to work. I may work on improving the tests later, but as far as I can tell:
- 24-bit doesn't seem to be supported on Windows.
- 8-bit and 16-bit modes are only succeeding in 32bit.
- WM_DISPLAYCHANGE, when received, always has the bpp that was requested.
The tests in test_WM_DISPLAYCHANGE() are not really helpful because they're skipped most of the time currently.
24-bit doesn't seem to be supported on Windows.
24-bit is supported on older versions of Windows, such as XP.
WM_DISPLAYCHANGE, when received, always has the bpp that was requested.
No. I just test it on Windows 10. WM_DISPLAYCHANGE always reports 32 when changing to a 16-bit mode. Meanwhile, EnumDisplaySettings(ENUM_CURRENT_SETTINGS) after the mode change reports the requested 16-bit color depth. I think this is because 16-bit modes on Windows 10 are emulated. Because on XP, where 16-bit mode is actually supported, WM_DISPLAYCHANGE does report 16. And since 8-bit and 16-bit modes are emulated on Wine as well. I think it's best to implement the Windows 10 behavior (>= Windows 8 really).