https://git.reactos.org/?p=reactos.git;a=commitdiff;h=58daf942fe153c1519964…
commit 58daf942fe153c151996464d4f5d64cc2ee8e2d7
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Mon May 3 19:11:18 2021 +0300
Commit: GitHub <noreply(a)github.com>
CommitDate: Mon May 3 18:11:18 2021 +0200
[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-ntgdiddg… for the reference
(and confirmed by our headers).
Required by MS DirectDraw stack (ddraw.dll & dxg.sys).
CORE-17561
---
win32ss/gdi/gdi32/misc/gdientry.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/win32ss/gdi/gdi32/misc/gdientry.c b/win32ss/gdi/gdi32/misc/gdientry.c
index dffa8ab63f7..aff5ddd1cfd 100644
--- a/win32ss/gdi/gdi32/misc/gdientry.c
+++ b/win32ss/gdi/gdi32/misc/gdientry.c
@@ -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,
-