On 11/26/21 8:12 AM, Zhiyi Zhang wrote:
Hi Jacek,
There are many X11DRV_EnumDisplaySettingsEx() failures after this patch when running user32/tests/monitor.c tests that doesn't appear before. Also the monitor resolution doesn't get restored after finishing the tests.
... 0080:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\.\DISPLAY1" registry display settings. 0080:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\.\DISPLAY2" registry display settings. 0080:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\.\DISPLAY1" registry display settings. 0080:err:x11settings:X11DRV_EnumDisplaySettingsEx Failed to get L"\\.\DISPLAY2" registry display settings. 0020:monitor: 942 tests executed (31 marked as todo, 0 failures), 1 skipped.
It seems to be caused by the old prepare_devices() not deleting Wine-specific adapter keys and driver settings code depends on it. I will send an updated series doing. Ultimately, we will want this to be more reliable (right now if adapter numbering changes, we may not do the right thing). Moving registry handling part of ChangeDisplaySettingsEx and EnumDisplaySettingsEx from drivers to win32u could help with that.
Thanks,
Jacek