From 2e19d9c47321340306b11c45ba68b31cb3ff51e6 Mon Sep 17 00:00:00 2001 From: Dmitry Timoshkov Date: Sun, 4 May 2008 12:38:58 +0900 Subject: [PATCH] user32: Set the size of returned DEVMODE to least common one as XP does. --- dlls/user32/sysparams.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dlls/user32/sysparams.c b/dlls/user32/sysparams.c index 2fa3feecf3..71e846dd31 100644 --- a/dlls/user32/sysparams.c +++ b/dlls/user32/sysparams.c @@ -3074,7 +3074,7 @@ BOOL WINAPI EnumDisplaySettingsExA(LPCSTR lpszDeviceName, DWORD iModeNum, ret = EnumDisplaySettingsExW(nameW.Buffer,iModeNum,&devmodeW,dwFlags); if (ret) { - lpDevMode->dmSize = sizeof(*lpDevMode); + lpDevMode->dmSize = FIELD_OFFSET(DEVMODEA, dmICMMethod); lpDevMode->dmSpecVersion = devmodeW.dmSpecVersion; lpDevMode->dmDriverVersion = devmodeW.dmDriverVersion; WideCharToMultiByte(CP_ACP, 0, devmodeW.dmDeviceName, -1, -- 2.32.0.93.g670b81a890