https://git.reactos.org/?p=reactos.git;a=commitdiff;h=855bf46399b0f3c852250…
commit 855bf46399b0f3c852250cccf11fb655e536be78
Author: Oleg Dubinskiy <oleg.dubinskij2013(a)yandex.ua>
AuthorDate: Fri May 1 16:57:11 2020 +0300
Commit: GitHub <noreply(a)github.com>
CommitDate: Fri May 1 15:57:11 2020 +0200
[WIN32SS][NTDDRAW] Get complexity of visible region in DxEngGetDCState (#2604)
CORE-7733
Get the complexity of visible region in the DxEngGetDCState() function, according to
its remarks.
This implementation returns a number of rectangles that make up the region, similarly
to as it done in REGION_Complexity() function:
https://git.reactos.org/?p=reactos.git;a=blob;f=win32ss/gdi/ntgdi/region.c;…
It is required by MS ddraw.dll when calling win32k/dxg functions during launching
DirectDraw test or any DirectX 1 - 7 apps/games.
---
win32ss/reactx/ntddraw/dxeng.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/win32ss/reactx/ntddraw/dxeng.c b/win32ss/reactx/ntddraw/dxeng.c
index f1c681f1e3f..24cb542643e 100644
--- a/win32ss/reactx/ntddraw/dxeng.c
+++ b/win32ss/reactx/ntddraw/dxeng.c
@@ -4,6 +4,7 @@
* FILE: win32ss/reactx/ntddraw/dxeng.c
* PURPOSE: Implementation of DxEng functions
* PROGRAMMERS: Magnus Olsen (magnus(a)greatlord.com)
+ * Oleg Dubinskiy (oleg.dubinskij2013(a)yandex.ua)
*/
#include <win32k.h>
@@ -442,7 +443,7 @@ DxEngSetHdevData(HDEV hDev,
* Return one of the type values
*
* @remarks.
-* We do not have type 2 implemented yet
+* none
*
*--*/
DWORD_PTR
@@ -463,7 +464,8 @@ DxEngGetDCState(HDC hDC,
retVal = (DWORD_PTR) pDC->fs & DC_FLAG_FULLSCREEN;
break;
case 2:
- UNIMPLEMENTED;
+ /* Return the number of rectangles in the visible region. */
+ retVal = (DWORD_PTR) pDC->prgnRao ? pDC->prgnRao->rdh.nCount :
pDC->prgnVis->rdh.nCount;
break;
case 3:
{