- Fix parameter handling in EnumDisplaySettingsExA.

svn path=/trunk/; revision=12245
This commit is contained in:
Filip Navara 2004-12-20 01:50:39 +00:00
parent 27a6be65a9
commit 5888259db6

View file

@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 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 * PROJECT: ReactOS user32.dll
* FILE: lib/user32/misc/dde.c * FILE: lib/user32/misc/dde.c
@ -200,7 +200,6 @@ EnumDisplaySettingsExA(
{ {
BOOL rc; BOOL rc;
UNICODE_STRING DeviceName; UNICODE_STRING DeviceName;
DEVMODEW DevModeW;
if ( !RtlCreateUnicodeStringFromAsciiz ( &DeviceName, (PCSZ)lpszDeviceName ) ) if ( !RtlCreateUnicodeStringFromAsciiz ( &DeviceName, (PCSZ)lpszDeviceName ) )
{ {
@ -208,12 +207,15 @@ EnumDisplaySettingsExA(
return FALSE; return FALSE;
} }
RosRtlDevModeA2W ( &DevModeW, lpDevMode ); /*
* NOTE: We don't need to convert between DEVMODEW and DEVMODEA because
rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, &DevModeW, dwFlags ); * only dmBitsPerPel, dmPelsWidth, dmPelsHeight, dmDisplayFlags and
* dmDisplayFrequency fields are set.
*/
rc = NtUserEnumDisplaySettings ( &DeviceName, iModeNum, (LPDEVMODEW)lpDevMode,
dwFlags );
RtlFreeUnicodeString ( &DeviceName ); RtlFreeUnicodeString ( &DeviceName );
RosRtlDevModeW2A ( lpDevMode, &DevModeW );
return rc; return rc;
} }