Author: sginsberg
Date: Wed Sep  9 19:56:22 2015
New Revision: 69161

URL: http://svn.reactos.org/svn/reactos?rev=69161&view=rev
Log:
[WIN32SS] Fix the fix by removing the correct parameter. The 
NtUserChangeDisplaySettings syscall is expected to make use of the lParam 
pointer (which must be NULL unless the CDS_VIDEOPARAMETERS flag is set).

Modified:
    trunk/reactos/win32ss/include/ntuser.h
    trunk/reactos/win32ss/user/ntuser/display.c
    trunk/reactos/win32ss/user/user32/misc/display.c

Modified: trunk/reactos/win32ss/include/ntuser.h
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/include/ntuser.h?rev=69161&r1=69160&r2=69161&view=diff
==============================================================================
--- trunk/reactos/win32ss/include/ntuser.h      [iso-8859-1] (original)
+++ trunk/reactos/win32ss/include/ntuser.h      [iso-8859-1] Wed Sep  9 
19:56:22 2015
@@ -1696,8 +1696,8 @@
 NtUserChangeDisplaySettings(
     PUNICODE_STRING lpszDeviceName,
     LPDEVMODEW lpDevMode,
-    HWND hwnd,
-    DWORD dwflags);
+    DWORD dwflags,
+    LPVOID lParam);
 
 BOOL
 NTAPI

Modified: trunk/reactos/win32ss/user/ntuser/display.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/display.c?rev=69161&r1=69160&r2=69161&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/display.c [iso-8859-1] Wed Sep  9 
19:56:22 2015
@@ -814,8 +814,8 @@
 NtUserChangeDisplaySettings(
     PUNICODE_STRING pustrDevice,
     LPDEVMODEW lpDevMode,
-    HWND hWnd,
-    DWORD dwflags)
+    DWORD dwflags,
+    LPVOID lParam)
 {
     WCHAR awcDevice[CCHDEVICENAME];
     UNICODE_STRING ustrDevice;
@@ -823,8 +823,7 @@
     LONG lRet;
 
     /* Check arguments */
-    if ((dwflags != CDS_VIDEOPARAMETERS) ||
-        (hWnd != NULL))
+    if ((dwflags != CDS_VIDEOPARAMETERS) && (lParam != NULL))
     {
         EngSetLastError(ERROR_INVALID_PARAMETER);
         return DISP_CHANGE_BADPARAM;

Modified: trunk/reactos/win32ss/user/user32/misc/display.c
URL: 
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/user32/misc/display.c?rev=69161&r1=69160&r2=69161&view=diff
==============================================================================
--- trunk/reactos/win32ss/user/user32/misc/display.c    [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/user32/misc/display.c    [iso-8859-1] Wed Sep  9 
19:56:22 2015
@@ -457,14 +457,14 @@
         pDevModeW = GdiConvertToDevmodeW(lpDevMode);
         if(pDevModeW)
         {
-            rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, hwnd, 
dwflags);
+            rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, dwflags, 
lParam);
             RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
         }
         else
             rc = DISP_CHANGE_SUCCESSFUL;
     }
     else
-        rc = NtUserChangeDisplaySettings(pDeviceName, NULL, hwnd, dwflags);
+        rc = NtUserChangeDisplaySettings(pDeviceName, NULL, dwflags, lParam);
 
     if (lpszDeviceName != NULL)
         RtlFreeUnicodeString(&DeviceName);
@@ -509,7 +509,7 @@
     else
         pDeviceName = NULL;
 
-    rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
+    rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags, lParam);
 
     return rc;
 }


Reply via email to