http://bugs.winehq.org/show_bug.cgi?id=16777
Summary: EnumDisplaySettingsEx does not set DM_DISPLAYFLAGS Product: Wine Version: 1.1.12 Platform: Other OS/Version: other Status: UNCONFIRMED Severity: minor Priority: P2 Component: winex11.drv AssignedTo: wine-bugs@winehq.org ReportedBy: excors@gmail.com
I have a (non-public) application that says:
EnumDisplaySettingsA(0, ENUM_CURRENT_SETTINGS, &dm); // [omitted error handling] // EnumDisplaySettings is documented to set the values of the following: const DWORD expectedFlags = DM_PELSWIDTH|DM_PELSHEIGHT|DM_BITSPERPEL|DM_DISPLAYFREQUENCY|DM_DISPLAYFLAGS; assert((dm.dmFields & expectedFlags) == expectedFlags);
http://msdn.microsoft.com/en-us/library/ms533265(VS.85).aspx says:
"The EnumDisplaySettings function sets values for the following five DEVMODE members: dmBitsPerPel, dmPelsWidth, dmPelsHeight, dmDisplayFlags, dmDisplayFrequency"
so that behaviour is indeed documented.
X11DRV_EnumDisplaySettingsEx initialises dmDisplayFlags to 0, but it does not add DM_DISPLAYFLAGS to dmFields, and so the application complains.