mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[WIN32SS][NTDDRAW] Improve DxEngGetDCState type 2 implementation (#4176)
- Use the REGION_Complexity() function to get the actual region complexity instead of just number of rectangles.
- Don't use prgnRao at all, because it is always uninitialized when passed to the function. So in condition between prgnRao and prgnVis, the 2nd one always succeeds.
- Update the comment accordingly.
- Additionally, add a DPRINT to the end of the function, which displays the returned value.
This allows to properly enable and use DirectDraw and Direct3D hardware acceleration with the following MS DirectX components: ddraw.dll, d3d8.dll, d3d9.dll and dxg.sys. As in VM, same on real hardware.
But note that now the bugcheck 0x50 (PAGE_FAULT_IN_NONPAGED_AREA) occurs when executing fullscreen DDraw apps, after switching display mode. It's unhidden by this fix.
Addendum to 855bf46
.
CORE-17561
This commit is contained in:
parent
9d33a2056e
commit
8a6312abda
1 changed files with 4 additions and 2 deletions
|
@ -464,8 +464,8 @@ DxEngGetDCState(HDC hDC,
|
|||
retVal = (DWORD_PTR) pDC->fs & DC_FLAG_FULLSCREEN;
|
||||
break;
|
||||
case 2:
|
||||
/* Return the number of rectangles in the visible region. */
|
||||
retVal = (DWORD_PTR) pDC->prgnRao ? pDC->prgnRao->rdh.nCount : pDC->prgnVis->rdh.nCount;
|
||||
/* Return the complexity of the visible region. */
|
||||
retVal = (DWORD_PTR) REGION_Complexity(pDC->prgnVis);
|
||||
break;
|
||||
case 3:
|
||||
{
|
||||
|
@ -481,6 +481,8 @@ DxEngGetDCState(HDC hDC,
|
|||
DC_UnlockDc(pDC);
|
||||
}
|
||||
|
||||
DPRINT1("Return value %08lx\n", retVal);
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue