[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).

svn path=/trunk/; revision=69161
This commit is contained in:
Stefan Ginsberg 2015-09-09 19:56:22 +00:00
parent 95a7eb8721
commit c20976ef8c
3 changed files with 8 additions and 9 deletions

View file

@ -1696,8 +1696,8 @@ NTAPI
NtUserChangeDisplaySettings(
PUNICODE_STRING lpszDeviceName,
LPDEVMODEW lpDevMode,
HWND hwnd,
DWORD dwflags);
DWORD dwflags,
LPVOID lParam);
BOOL
NTAPI

View file

@ -814,8 +814,8 @@ APIENTRY
NtUserChangeDisplaySettings(
PUNICODE_STRING pustrDevice,
LPDEVMODEW lpDevMode,
HWND hWnd,
DWORD dwflags)
DWORD dwflags,
LPVOID lParam)
{
WCHAR awcDevice[CCHDEVICENAME];
UNICODE_STRING ustrDevice;
@ -823,8 +823,7 @@ NtUserChangeDisplaySettings(
LONG lRet;
/* Check arguments */
if ((dwflags != CDS_VIDEOPARAMETERS) ||
(hWnd != NULL))
if ((dwflags != CDS_VIDEOPARAMETERS) && (lParam != NULL))
{
EngSetLastError(ERROR_INVALID_PARAMETER);
return DISP_CHANGE_BADPARAM;

View file

@ -457,14 +457,14 @@ ChangeDisplaySettingsExA(
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 @@ ChangeDisplaySettingsExW(
else
pDeviceName = NULL;
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags, lParam);
return rc;
}