Author: greatlrd
Date: Tue Feb 26 01:21:33 2008
New Revision: 32484
URL:
http://svn.reactos.org/svn/reactos?rev=32484&view=rev
Log:
implemet follow for the callback interface videoport in
gdi32.dll/win32/gdi32/misc/gdientry.c
DvpCreateVideoPort, DvpDestroyVideoPort, DvpFlipVideoPort
Bugfix : DdGetDriverInfo for the videoport callback interface set the
pUserDvdPort->dwFlags right 8not tested in windows yet)
Bugfix : DdQueryDirectDrawObject forget two d3d* callbacks to setup propert to user mode.
Modified:
trunk/reactos/dll/win32/gdi32/misc/gdientry.c
Modified: trunk/reactos/dll/win32/gdi32/misc/gdientry.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/misc/gdien…
==============================================================================
--- trunk/reactos/dll/win32/gdi32/misc/gdientry.c (original)
+++ trunk/reactos/dll/win32/gdi32/misc/gdientry.c Tue Feb 26 01:21:33 2008
@@ -484,6 +484,51 @@
(PDD_GETSCANLINEDATA)pGetScanLine);
}
+
+/*
+ * @implemented
+ *
+ * DvpCreateVideoPort
+ */
+BOOL
+WINAPI
+DvpCreateVideoPort(LPDDHAL_CREATEVPORTDATA pDvdCreatePort)
+{
+ pDvdCreatePort->lpVideoPort->hDDVideoPort =
+ NtGdiDvpCreateVideoPort(GetDdHandle(pDvdCreatePort->lpDD->lpGbl->hDD),
+ (PDD_CREATEVPORTDATA) pDvdCreatePort);
+
+ return TRUE;
+}
+
+/*
+ * @implemented
+ *
+ * DvpCreateVideoPort
+ */
+DWORD
+WINAPI
+DvpDestroyVideoPort(LPDDHAL_DESTROYVPORTDATA pDvdDestoryPort)
+{
+ return NtGdiDvpDestroyVideoPort(pDvdDestoryPort->lpVideoPort->hDDVideoPort,
(PDD_DESTROYVPORTDATA)pDvdDestoryPort);
+}
+
+/*
+ * @implemented
+ *
+ * DvpCreateVideoPort
+ */
+DWORD
+WINAPI
+DvpFlipVideoPort(LPDDHAL_FLIPVPORTDATA pDvdPortFlip)
+{
+ return NtGdiDvpFlipVideoPort(pDvdPortFlip->lpVideoPort->hDDVideoPort,
+ (HANDLE)pDvdPortFlip->lpSurfCurr->hDDSurface,
+ (HANDLE)pDvdPortFlip->lpSurfTarg->hDDSurface,
+ (PDD_FLIPVPORTDATA) pDvdPortFlip);
+}
+
+
DWORD
WINAPI
DdGetDriverInfo(LPDDHAL_GETDRIVERINFODATA pData)
@@ -519,13 +564,16 @@
/* Setup user out buffer and convert kmode callbacks to user mode */
pUserDvdPort->dwSize = DDVIDEOPORTCALLBACKSSIZE;
-
- // FIXME setup the flags
- // pUserDvdPort->dwFlags = eax;
+
+ pUserDvdPort->dwFlags = (pDvdPortInfo.dwFlags &
~(DDHAL_VPORT32_CREATEVIDEOPORT | DDHAL_VPORT32_FLIP |
+ DDHAL_VPORT32_DESTROY |
DDHAL_VPORT32_UPDATE | DDHAL_VPORT32_WAITFORSYNC)) |
+ (DDHAL_VPORT32_CREATEVIDEOPORT |
DDHAL_VPORT32_FLIP |
+ DDHAL_VPORT32_DESTROY |
DDHAL_VPORT32_UPDATE);
+
pData->dwActualSize = DDVIDEOPORTCALLBACKSSIZE;
- pUserDvdPort->CreateVideoPort = (LPDDHALVPORTCB_CREATEVIDEOPORT) NULL; //
FIXME : DvpCreateVideoPort
- pUserDvdPort->FlipVideoPort = (LPDDHALVPORTCB_FLIP) NULL; // FIXME :
DvpFlipVideoPort
- pUserDvdPort->DestroyVideoPort = (LPDDHALVPORTCB_DESTROYVPORT) NULL; // FIXME
: DvpDestroyVideoPort
+ pUserDvdPort->CreateVideoPort = (LPDDHALVPORTCB_CREATEVIDEOPORT)
DvpCreateVideoPort;
+ pUserDvdPort->FlipVideoPort = (LPDDHALVPORTCB_FLIP) DvpFlipVideoPort;
+ pUserDvdPort->DestroyVideoPort = (LPDDHALVPORTCB_DESTROYVPORT)
DvpDestroyVideoPort;
pUserDvdPort->UpdateVideoPort = (LPDDHALVPORTCB_UPDATE) NULL; // FIXME :
DvpUpdateVideoPort
if (pDvdPort.CanCreateVideoPort)
@@ -1120,7 +1168,7 @@
if ( D3dBufferCallbacks.DestroyD3DBuffer )
{
- pD3dBufferCallbacks->DestroyExecuteBuffer =
(LPDDHALEXEBUFCB_DESTROYEXEBUF) NULL; //DdDestroyD3DBuffer;
+ pD3dBufferCallbacks->DestroyExecuteBuffer =
(LPDDHALEXEBUFCB_DESTROYEXEBUF) DdDestroyD3DBuffer;
}
if ( D3dBufferCallbacks.LockD3DBuffer )
@@ -1130,7 +1178,7 @@
if ( D3dBufferCallbacks.UnlockD3DBuffer )
{
- pD3dBufferCallbacks->UnlockExecuteBuffer =
(LPDDHALEXEBUFCB_UNLOCKEXEBUF) NULL; //DdUnlockD3D;
+ pD3dBufferCallbacks->UnlockExecuteBuffer =
(LPDDHALEXEBUFCB_UNLOCKEXEBUF) DdUnlockD3D;
}
}