[GDI32] Fix wrong ordering of parameters in NtGdiDdGetDC call (#3637)

It allows to properly pass the surface handle (and palette entry pointer) from MS ddraw into win32k.
Otherwise, they are passing into the wrong parameters of actual NtGdi* function, and due to this,
since they're detected as invalid, they become NULL, and that function does not work correctly.

See https://docs.microsoft.com/en-us/windows/win32/devnotes/-dxgkernel-ntgdiddgetdc for the reference
(and confirmed by our headers).

Required by MS DirectDraw stack (ddraw.dll & dxg.sys).
CORE-17561
This commit is contained in:
Oleg Dubinskiy 2021-05-03 19:11:18 +03:00 committed by GitHub
parent 11a60cebea
commit 58daf942fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1924,7 +1924,7 @@ DdGetDC(LPDDRAWI_DDRAWSURFACE_LCL pSurfaceLocal,
LPPALETTEENTRY pColorTable)
{
/* Call win32k directly */
return NtGdiDdGetDC(pColorTable, (HANDLE) pSurfaceLocal->hDDSurface);
return NtGdiDdGetDC((HANDLE)pSurfaceLocal->hDDSurface, pColorTable);
}
/*
@ -2082,4 +2082,3 @@ DdSetGammaRamp(LPDDRAWI_DIRECTDRAW_LCL pDDraw,