implement DxDdLockDirectDrawSurface in dxg

svn path=/trunk/; revision=31508
This commit is contained in:
Magnus Olsen 2007-12-30 22:41:31 +00:00
parent 81de8eeb8d
commit 2f61a33495
4 changed files with 22 additions and 4 deletions

View file

@ -1,6 +1,6 @@
DRVFN gaDxgFuncs [] =
DRVFN gaDxgFuncs [] =
{
{DXG_INDEX_DxDxgGenericThunk, (PFN)DxDxgGenericThunk},
//{DXG_INDEX_DxD3dContextCreate, (PFN)DxD3dContextCreate},
@ -88,7 +88,7 @@ DRVFN gaDxgFuncs [] =
//{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},

View file

@ -88,6 +88,7 @@ extern PLARGE_INTEGER gpLockShortDelay;
/* 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);

View file

@ -5,10 +5,27 @@
* FILE: drivers/directx/dxg/main.c
* PROGRAMER: Magnus olsen (magnus@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;
}

View file

@ -206,7 +206,7 @@ typedef DWORD (NTAPI *PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T*, PVOID,
//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)(