From 5888259db62993f1bfe9e32a4bd75675337e98b7 Mon Sep 17 00:00:00 2001 From: Filip Navara Date: Mon, 20 Dec 2004 01:50:39 +0000 Subject: [PATCH] - Fix parameter handling in EnumDisplaySettingsExA. svn path=/trunk/; revision=12245 --- reactos/lib/user32/misc/display.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/reactos/lib/user32/misc/display.c b/reactos/lib/user32/misc/display.c index 2e0b903b901..8a1230b33b0 100644 --- a/reactos/lib/user32/misc/display.c +++ b/reactos/lib/user32/misc/display.c @@ -16,7 +16,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ -/* $Id: display.c,v 1.14 2004/12/12 21:25:04 weiden Exp $ +/* $Id: display.c,v 1.15 2004/12/20 01:50:39 navaraf Exp $ * * PROJECT: ReactOS user32.dll * FILE: lib/user32/misc/dde.c @@ -200,7 +200,6 @@ EnumDisplaySettingsExA( { BOOL rc; UNICODE_STRING DeviceName; - DEVMODEW DevModeW; if ( !RtlCreateUnicodeStringFromAsciiz ( &DeviceName, (PCSZ)lpszDeviceName ) ) { @@ -208,12 +207,15 @@ EnumDisplaySettingsExA( return FALSE; } - RosRtlDevModeA2W ( &DevModeW, lpDevMode ); - - rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &DevModeW, dwFlags ); + /* + * NOTE: We don't need to convert between DEVMODEW and DEVMODEA because + * only dmBitsPerPel, dmPelsWidth, dmPelsHeight, dmDisplayFlags and + * dmDisplayFrequency fields are set. + */ + rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, (LPDEVMODEW)lpDevMode, + dwFlags ); RtlFreeUnicodeString ( &DeviceName ); - RosRtlDevModeW2A ( lpDevMode, &DevModeW ); return rc; }