mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +00:00
[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:
parent
95a7eb8721
commit
c20976ef8c
3 changed files with 8 additions and 9 deletions
|
@ -1696,8 +1696,8 @@ NTAPI
|
||||||
NtUserChangeDisplaySettings(
|
NtUserChangeDisplaySettings(
|
||||||
PUNICODE_STRING lpszDeviceName,
|
PUNICODE_STRING lpszDeviceName,
|
||||||
LPDEVMODEW lpDevMode,
|
LPDEVMODEW lpDevMode,
|
||||||
HWND hwnd,
|
DWORD dwflags,
|
||||||
DWORD dwflags);
|
LPVOID lParam);
|
||||||
|
|
||||||
BOOL
|
BOOL
|
||||||
NTAPI
|
NTAPI
|
||||||
|
|
|
@ -814,8 +814,8 @@ APIENTRY
|
||||||
NtUserChangeDisplaySettings(
|
NtUserChangeDisplaySettings(
|
||||||
PUNICODE_STRING pustrDevice,
|
PUNICODE_STRING pustrDevice,
|
||||||
LPDEVMODEW lpDevMode,
|
LPDEVMODEW lpDevMode,
|
||||||
HWND hWnd,
|
DWORD dwflags,
|
||||||
DWORD dwflags)
|
LPVOID lParam)
|
||||||
{
|
{
|
||||||
WCHAR awcDevice[CCHDEVICENAME];
|
WCHAR awcDevice[CCHDEVICENAME];
|
||||||
UNICODE_STRING ustrDevice;
|
UNICODE_STRING ustrDevice;
|
||||||
|
@ -823,8 +823,7 @@ NtUserChangeDisplaySettings(
|
||||||
LONG lRet;
|
LONG lRet;
|
||||||
|
|
||||||
/* Check arguments */
|
/* Check arguments */
|
||||||
if ((dwflags != CDS_VIDEOPARAMETERS) ||
|
if ((dwflags != CDS_VIDEOPARAMETERS) && (lParam != NULL))
|
||||||
(hWnd != NULL))
|
|
||||||
{
|
{
|
||||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||||
return DISP_CHANGE_BADPARAM;
|
return DISP_CHANGE_BADPARAM;
|
||||||
|
|
|
@ -457,14 +457,14 @@ ChangeDisplaySettingsExA(
|
||||||
pDevModeW = GdiConvertToDevmodeW(lpDevMode);
|
pDevModeW = GdiConvertToDevmodeW(lpDevMode);
|
||||||
if(pDevModeW)
|
if(pDevModeW)
|
||||||
{
|
{
|
||||||
rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, hwnd, dwflags);
|
rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, dwflags, lParam);
|
||||||
RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
|
RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = DISP_CHANGE_SUCCESSFUL;
|
rc = DISP_CHANGE_SUCCESSFUL;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
rc = NtUserChangeDisplaySettings(pDeviceName, NULL, hwnd, dwflags);
|
rc = NtUserChangeDisplaySettings(pDeviceName, NULL, dwflags, lParam);
|
||||||
|
|
||||||
if (lpszDeviceName != NULL)
|
if (lpszDeviceName != NULL)
|
||||||
RtlFreeUnicodeString(&DeviceName);
|
RtlFreeUnicodeString(&DeviceName);
|
||||||
|
@ -509,7 +509,7 @@ ChangeDisplaySettingsExW(
|
||||||
else
|
else
|
||||||
pDeviceName = NULL;
|
pDeviceName = NULL;
|
||||||
|
|
||||||
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
|
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags, lParam);
|
||||||
|
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue