Author: greatlrd
Date: Mon Dec 31 01:41:31 2007
New Revision: 31508
URL:
http://svn.reactos.org/svn/reactos?rev=31508&view=rev
Log:
implement DxDdLockDirectDrawSurface in dxg
Modified:
trunk/reactos/drivers/directx/dxg/dxg_driver.h
trunk/reactos/drivers/directx/dxg/dxg_int.h
trunk/reactos/drivers/directx/dxg/eng.c
trunk/reactos/include/reactos/drivers/directx/dxg.h
Modified: trunk/reactos/drivers/directx/dxg/dxg_driver.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/dxg_dr…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/dxg_driver.h (original)
+++ trunk/reactos/drivers/directx/dxg/dxg_driver.h Mon Dec 31 01:41:31 2007
@@ -1,6 +1,6 @@
-DRVFN gaDxgFuncs [] =
+DRVFN gaDxgFuncs [] =
{
{DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk},
//{DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate},
@@ -88,7 +88,7 @@
//{DXG_INDEX_DxDdEnableDirectDrawRedirection, (PFN)DxDdEnableDirectDrawRedirection},
//{DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem},
//{DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem},
- //{DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface},
+ {DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface},
//{DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface},
//{DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel},
//{DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock},
Modified: trunk/reactos/drivers/directx/dxg/dxg_int.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/dxg_in…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/dxg_int.h (original)
+++ trunk/reactos/drivers/directx/dxg/dxg_int.h Mon Dec 31 01:41:31 2007
@@ -88,6 +88,7 @@
/* Driver list export functions */
DWORD STDCALL DxDxgGenericThunk(ULONG_PTR ulIndex, ULONG_PTR ulHandle, SIZE_T
*pdwSizeOfPtr1, PVOID pvPtr1, SIZE_T *pdwSizeOfPtr2, PVOID pvPtr2);
DWORD STDCALL DxDdIoctl(ULONG ulIoctl, PVOID pBuffer, ULONG ulBufferSize);
+PDD_SURFACE_LOCAL STDCALL DxDdLockDirectDrawSurface(HANDLE hDdSurface);
/* Internel functions */
BOOL FASTCALL VerifyObjectOwner(PDD_ENTRY pEntry);
Modified: trunk/reactos/drivers/directx/dxg/eng.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/directx/dxg/eng.c?…
==============================================================================
--- trunk/reactos/drivers/directx/dxg/eng.c (original)
+++ trunk/reactos/drivers/directx/dxg/eng.c Mon Dec 31 01:41:31 2007
@@ -5,10 +5,27 @@
* FILE: drivers/directx/dxg/main.c
* PROGRAMER: Magnus olsen (magnus(a)greatlord.com)
* REVISION HISTORY:
- * 15/10-2007 Magnus Olsen
+ * 30/12-2007 Magnus Olsen
*/
+#include <dxg_int.h>
+PDD_SURFACE_LOCAL
+STDCALL
+DxDdLockDirectDrawSurface(HANDLE hDdSurface)
+{
+ PDD_ENTRY pObject;
+ PDD_SURFACE_LOCAL pSurfacelcl = NULL;
+ pObject = DdHmgLock(hDdSurface, 2, 0);
+ if (pObject != NULL)
+ {
+ pSurfacelcl = (PDD_SURFACE_LOCAL)((PBYTE)pObject + sizeof(PDD_ENTRY));
+ }
+
+ return pSurfacelcl;
+}
+
+
Modified: trunk/reactos/include/reactos/drivers/directx/dxg.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/drivers/di…
==============================================================================
--- trunk/reactos/include/reactos/drivers/directx/dxg.h (original)
+++ trunk/reactos/include/reactos/drivers/directx/dxg.h Mon Dec 31 01:41:31 2007
@@ -206,7 +206,7 @@
//typedef x (NTAPI *PGD_DxDdEnableDirectDrawRedirection)(
//typedef x (NTAPI *PGD_DxDdAllocPrivateUserMem)(
//typedef x (NTAPI *PGD_DxDdFreePrivateUserMem)(
-//typedef x (NTAPI *PGD_DxDdLockDirectDrawSurface)(
+typedef PDD_SURFACE_LOCAL (NTAPI *PGD_DxDdLockDirectDrawSurface)(HANDLE hDdSurface);
//typedef x (NTAPI *PGD_DxDdUnlockDirectDrawSurface)(
//typedef x (NTAPI *PGD_DxDdSetAccelLevel)(
//typedef x (NTAPI *PGD_DxDdGetSurfaceLock)(