mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 04:13:33 +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:
@@ -1696,8 +1696,8 @@ NTAPI
|
||||
NtUserChangeDisplaySettings(
|
||||
PUNICODE_STRING lpszDeviceName,
|
||||
LPDEVMODEW lpDevMode,
|
||||
HWND hwnd,
|
||||
DWORD dwflags);
|
||||
DWORD dwflags,
|
||||
LPVOID lParam);
|
||||
|
||||
BOOL
|
||||
NTAPI
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user