winemac.drv: Zero initialize DEVMODE before passing it to EnumDisplaySettings().
EnumDisplaySettings() on Wine does not write beyond the end of DEVMODE because it doesn't use dmDriverExtra currently, but this implementation detail should not be relied on. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Ken Thomases <ken@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
440fab3870
commit
6185252bbc
|
@ -847,6 +847,7 @@ LONG CDECL macdrv_ChangeDisplaySettingsEx(LPCWSTR devname, LPDEVMODEW devmode,
|
||||||
|
|
||||||
if (!devname && !devmode)
|
if (!devname && !devmode)
|
||||||
{
|
{
|
||||||
|
memset(&default_mode, 0, sizeof(default_mode));
|
||||||
default_mode.dmSize = sizeof(default_mode);
|
default_mode.dmSize = sizeof(default_mode);
|
||||||
if (!EnumDisplaySettingsExW(primary_adapter, ENUM_REGISTRY_SETTINGS, &default_mode, 0))
|
if (!EnumDisplaySettingsExW(primary_adapter, ENUM_REGISTRY_SETTINGS, &default_mode, 0))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue