mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
Implement DxDdUnlockDirectDrawSurface
Fixed smaller typo in DxDdLockDirectDrawSurface sorry svn path=/trunk/; revision=31509
This commit is contained in:
parent
2f61a33495
commit
a4aca0de8c
4 changed files with 23 additions and 6 deletions
|
@ -89,7 +89,7 @@ DRVFN gaDxgFuncs [] =
|
|||
//{DXG_INDEX_DxDdAllocPrivateUserMem, (PFN)DxDdAllocPrivateUserMem},
|
||||
//{DXG_INDEX_DxDdFreePrivateUserMem, (PFN)DxDdFreePrivateUserMem},
|
||||
{DXG_INDEX_DxDdLockDirectDrawSurface, (PFN)DxDdLockDirectDrawSurface},
|
||||
//{DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface},
|
||||
{DXG_INDEX_DxDdUnlockDirectDrawSurface, (PFN)DxDdUnlockDirectDrawSurface},
|
||||
//{DXG_INDEX_DxDdSetAccelLevel, (PFN)DxDdSetAccelLevel},
|
||||
//{DXG_INDEX_DxDdGetSurfaceLock, (PFN)DxDdGetSurfaceLock},
|
||||
//{DXG_INDEX_DxDdEnumLockedSurfaceRect, (PFN)DxDdEnumLockedSurfaceRect},
|
||||
|
|
|
@ -89,6 +89,7 @@ extern PLARGE_INTEGER gpLockShortDelay;
|
|||
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);
|
||||
BOOL STDCALL DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface);
|
||||
|
||||
/* Internel functions */
|
||||
BOOL FASTCALL VerifyObjectOwner(PDD_ENTRY pEntry);
|
||||
|
|
|
@ -16,16 +16,32 @@ PDD_SURFACE_LOCAL
|
|||
STDCALL
|
||||
DxDdLockDirectDrawSurface(HANDLE hDdSurface)
|
||||
{
|
||||
PDD_ENTRY pObject;
|
||||
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
|
||||
|
||||
pObject = DdHmgLock(hDdSurface, 2, 0);
|
||||
if (pObject != NULL)
|
||||
pSurfacelcl = DdHmgLock(hDdSurface, 2, FALSE);
|
||||
if (pSurfacelcl != NULL)
|
||||
{
|
||||
pSurfacelcl = (PDD_SURFACE_LOCAL)((PBYTE)pObject + sizeof(PDD_ENTRY));
|
||||
pSurfacelcl = (PDD_SURFACE_LOCAL)(((PBYTE)&pSurfacelcl) + sizeof(DD_BASEOBJECT));
|
||||
}
|
||||
|
||||
return pSurfacelcl;
|
||||
}
|
||||
|
||||
BOOL
|
||||
STDCALL
|
||||
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
|
||||
{
|
||||
BOOL retVal = FALSE;
|
||||
PDD_BASEOBJECT pObject = NULL;
|
||||
|
||||
if (pSurface)
|
||||
{
|
||||
pObject = (PDD_BASEOBJECT)( ((PBYTE)&pSurface) - sizeof(DD_BASEOBJECT));
|
||||
InterlockedDecrement(&pObject->cExclusiveLock);
|
||||
retVal = TRUE;
|
||||
}
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -207,7 +207,7 @@ typedef DWORD (NTAPI *PGD_DXGENERICTRUNK)(ULONG_PTR, ULONG_PTR, SIZE_T*, PVOID,
|
|||
//typedef x (NTAPI *PGD_DxDdAllocPrivateUserMem)(
|
||||
//typedef x (NTAPI *PGD_DxDdFreePrivateUserMem)(
|
||||
typedef PDD_SURFACE_LOCAL (NTAPI *PGD_DxDdLockDirectDrawSurface)(HANDLE hDdSurface);
|
||||
//typedef x (NTAPI *PGD_DxDdUnlockDirectDrawSurface)(
|
||||
typedef BOOL (NTAPI *PGD_DxDdUnlockDirectDrawSurface)(HANDLE hDdSurface);
|
||||
//typedef x (NTAPI *PGD_DxDdSetAccelLevel)(
|
||||
//typedef x (NTAPI *PGD_DxDdGetSurfaceLock)(
|
||||
//typedef x (NTAPI *PGD_DxDdEnumLockedSurfaceRect)(
|
||||
|
|
Loading…
Reference in a new issue