Author: greatlrd
Date: Mon Oct 15 12:34:11 2007
New Revision: 29593
URL:
http://svn.reactos.org/svn/reactos?rev=29593&view=rev
Log:
finish redirect dvp interface to dxg.sys
Modified:
branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dvp.c
Modified: branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/include/intddraw.h Mon Oct 15 12:34:11
2007
@@ -40,6 +40,12 @@
typedef DWORD (NTAPI *PGD_D3DCONTEXTDESTROYALL)(LPD3DNTHAL_CONTEXTDESTROYALLDATA);
/* From dvp.c */
+typedef DWORD (NTAPI* PGD_DVPCANCREATEVIDEOPORT)(HANDLE, PDD_CANCREATEVPORTDATA);
+typedef DWORD (NTAPI* PGD_DVPCOLORCONTROL)(HANDLE, PDD_VPORTCOLORDATA);
+typedef DWORD (NTAPI* PGD_DVPCREATEVIDEOPORT(HANDLE, PDD_CREATEVPORTDATA);
+typedef DWORD (NTAPI* PGD_DVPDESTROYVIDEOPORT(HANDLE, PDD_DESTROYVPORTDATA);
+typedef DWORD (NTAPI* PGD_DVPFLIPVIDEOPORT)(HANDLE,HANDLE,HANDLE,PDD_FLIPVPORTDATA);
+typedef DWORD (NTAPI* PGD_DVPGETVIDEOPORTBANDWITH)(HANDLE, PDD_GETVPORTBANDWIDTHDATA);
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTFLIPSTATUS)(hDirectDraw,
puGetVPortFlipStatusData);
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTINPUTFORMATS)(HANDLE,
PDD_GETVPORTINPUTFORMATDATA);
typedef DWORD (NTAPI *PGD_DXDVPGETVIDEOPORTLINE)(HANDLE, PDD_GETVPORTLINEDATA);
Modified: branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dvp.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactx/reactos/subsystems/win32…
==============================================================================
--- branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dvp.c (original)
+++ branches/reactx/reactos/subsystems/win32/win32k/ntddraw/dvp.c Mon Oct 15 12:34:11
2007
@@ -13,18 +13,27 @@
#include <w32k.h>
#include <debug.h>
-DWORD (NTAPI* PGD_DVPFLIPVIDEOPORT)(HANDLE,HANDLE,HANDLE,PDD_FLIPVPORTDATA);
-DWORD (NTAPI* PGD_DVPGETVIDEOPORTBANDWITH)(HANDLE, PDD_GETVPORTBANDWIDTHDATA);
-
/************************************************************************/
/* NtGdiDvpCanCreateVideoPort */
/************************************************************************/
DWORD
STDCALL
-NtGdiDvpCanCreateVideoPort(hDirectDraw,
+NtGdiDvpCanCreateVideoPort(HANDLE hDirectDraw,
PDD_CANCREATEVPORTDATA puCanCreateVPortData)
{
-
+ PGD_DVPCANCREATEVIDEOPORT pfnDvpCanCreateVideoPort = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpCanCreateVideoPort, pfnDvpCanCreateVideoPort);
+
+ if (pfnDvpCanCreateVideoPort == NULL)
+ {
+ DPRINT1("Warring no pfnDvpCanCreateVideoPort");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDvpCanCreateVideoPort");
+ return pfnDvpCanCreateVideoPort(hDirectDraw, puCanCreateVPortData);
}
/************************************************************************/
@@ -35,7 +44,19 @@
NtGdiDvpColorControl(HANDLE hVideoPort,
PDD_VPORTCOLORDATA puVPortColorData)
{
-
+ PGD_DVPCOLORCONTROL pfnDvpColorControl = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpColorControl, pfnDvpColorControl);
+
+ if (pfnDvpColorControl == NULL)
+ {
+ DPRINT1("Warring no pfnDvpColorControl");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDvpColorControl");
+ return pfnDvpColorControl(hVideoPort, puVPortColorData);
}
/************************************************************************/
@@ -46,7 +67,19 @@
NtGdiDvpCreateVideoPort(HANDLE hDirectDraw,
PDD_CREATEVPORTDATA puCreateVPortData)
{
-
+ PGD_DVPCREATEVIDEOPORT pfnDvpCreateVideoPort = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpCreateVideoPort, pfnDvpCreateVideoPort);
+
+ if (pfnDvpCreateVideoPort == NULL)
+ {
+ DPRINT1("Warring no pfnDvpCreateVideoPort");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDvpCreateVideoPort");
+ return pfnDvpCreateVideoPort(hDirectDraw, puCreateVPortData);
}
/************************************************************************/
@@ -57,7 +90,19 @@
NtGdiDvpDestroyVideoPort(HANDLE hVideoPort,
PDD_DESTROYVPORTDATA puDestroyVPortData)
{
-
+ PGD_DVPDESTROYVIDEOPORT pfnDvpDestroyVideoPort = NULL;
+ INT i;
+
+ DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpDestroyVideoPort, pfnDvpDestroyVideoPort);
+
+ if (pfnDvpDestroyVideoPort == NULL)
+ {
+ DPRINT1("Warring no pfnDvpDestroyVideoPort");
+ return DDHAL_DRIVER_NOTHANDLED;
+ }
+
+ DPRINT1("Calling on dxg.sys pfnDvpDestroyVideoPort");
+ return pfnDvpDestroyVideoPort(hVideoPort, puDestroyVPortData);
}
/************************************************************************/
@@ -70,7 +115,7 @@
HANDLE hDDSurfaceTarget,
PDD_FLIPVPORTDATA puFlipVPortData)
{
- PGD_DVPFLIPVIDEOPORT pfnDvpFlipVideoPort= NULL;
+ PGD_DVPFLIPVIDEOPORT pfnDvpFlipVideoPort = NULL;
INT i;
DXG_GET_INDEX_FUNCTION(DXG_INDEX_DxDvpFlipVideoPort, pfnDvpFlipVideoPort);