Commit in reactos/lib/user32/misc on MAIN
display.c+8-61.14 -> 1.15
- Fix parameter handling in EnumDisplaySettingsExA.

reactos/lib/user32/misc
display.c 1.14 -> 1.15
diff -u -r1.14 -r1.15
--- display.c	12 Dec 2004 21:25:04 -0000	1.14
+++ display.c	20 Dec 2004 01:50:39 -0000	1.15
@@ -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 @@
 {
   BOOL rc;
   UNICODE_STRING DeviceName;
-  DEVMODEW DevModeW;
 
   if ( !RtlCreateUnicodeStringFromAsciiz ( &DeviceName, (PCSZ)lpszDeviceName ) )
     {
@@ -208,12 +207,15 @@
       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;
 }
CVSspam 0.2.8