mirror of
https://github.com/reactos/reactos.git
synced 2024-11-20 14:30:57 +00:00
[WIN32SS] Fix NtUserChangeDisplaySettings, I accidently removed one (unused) param too much (parameter count should be 4 after all), and it seems code relied on this check.
svn path=/trunk/; revision=69159
This commit is contained in:
parent
db9febf4fa
commit
30ea4eb1ae
4 changed files with 8 additions and 5 deletions
|
@ -1696,6 +1696,7 @@ NTAPI
|
|||
NtUserChangeDisplaySettings(
|
||||
PUNICODE_STRING lpszDeviceName,
|
||||
LPDEVMODEW lpDevMode,
|
||||
HWND hwnd,
|
||||
DWORD dwflags);
|
||||
|
||||
BOOL
|
||||
|
|
|
@ -814,6 +814,7 @@ APIENTRY
|
|||
NtUserChangeDisplaySettings(
|
||||
PUNICODE_STRING pustrDevice,
|
||||
LPDEVMODEW lpDevMode,
|
||||
HWND hWnd,
|
||||
DWORD dwflags)
|
||||
{
|
||||
WCHAR awcDevice[CCHDEVICENAME];
|
||||
|
@ -822,7 +823,8 @@ NtUserChangeDisplaySettings(
|
|||
LONG lRet;
|
||||
|
||||
/* Check arguments */
|
||||
if (dwflags != CDS_VIDEOPARAMETERS)
|
||||
if ((dwflags != CDS_VIDEOPARAMETERS) ||
|
||||
(hWnd != NULL))
|
||||
{
|
||||
EngSetLastError(ERROR_INVALID_PARAMETER);
|
||||
return DISP_CHANGE_BADPARAM;
|
||||
|
|
|
@ -457,14 +457,14 @@ ChangeDisplaySettingsExA(
|
|||
pDevModeW = GdiConvertToDevmodeW(lpDevMode);
|
||||
if(pDevModeW)
|
||||
{
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, dwflags);
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, pDevModeW, hwnd, dwflags);
|
||||
RtlFreeHeap(GetProcessHeap(), 0, pDevModeW);
|
||||
}
|
||||
else
|
||||
rc = DISP_CHANGE_SUCCESSFUL;
|
||||
}
|
||||
else
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, NULL, dwflags);
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, NULL, hwnd, dwflags);
|
||||
|
||||
if (lpszDeviceName != NULL)
|
||||
RtlFreeUnicodeString(&DeviceName);
|
||||
|
@ -509,7 +509,7 @@ ChangeDisplaySettingsExW(
|
|||
else
|
||||
pDeviceName = NULL;
|
||||
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, dwflags);
|
||||
rc = NtUserChangeDisplaySettings(pDeviceName, lpDevMode, hwnd, dwflags);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
|
|
@ -328,7 +328,7 @@
|
|||
SVC_(UserCallOneParam, 2)
|
||||
SVC_(UserCallTwoParam, 3)
|
||||
SVC_(UserChangeClipboardChain, 2)
|
||||
SVC_(UserChangeDisplaySettings, 3)
|
||||
SVC_(UserChangeDisplaySettings, 4)
|
||||
SVC_(UserCheckImeHotKey, 2)
|
||||
SVC_(UserCheckMenuItem, 3)
|
||||
SVC_(UserChildWindowFromPointEx, 4)
|
||||
|
|
Loading…
Reference in a new issue