mirror of
https://github.com/reactos/reactos.git
synced 2025-01-01 03:54:02 +00:00
remve EDD_SURFACE_LOCAL after reexaime it.
Use EDD_SURFACE instead move _DD_BASEOBJECT struct to correct header file make sure right unlock and lock using EDD_SURFACE svn path=/trunk/; revision=31511
This commit is contained in:
parent
39075187dd
commit
96ded05843
3 changed files with 19 additions and 23 deletions
|
@ -31,19 +31,13 @@
|
|||
|
||||
#include "tags.h"
|
||||
|
||||
typedef struct _DD_BASEOBJECT
|
||||
{
|
||||
HANDLE hHmgr;
|
||||
ULONG ulShareCount;
|
||||
LONG cExclusiveLock;
|
||||
PVOID Tid;
|
||||
} DD_BASEOBJECT, *PDD_BASEOBJECT, *POBJ;
|
||||
|
||||
|
||||
typedef struct _DD_ENTRY
|
||||
{
|
||||
union
|
||||
{
|
||||
POBJ pobj;
|
||||
PDD_BASEOBJECT pobj;
|
||||
HANDLE hFree;
|
||||
};
|
||||
union
|
||||
|
|
|
@ -16,13 +16,13 @@ PDD_SURFACE_LOCAL
|
|||
STDCALL
|
||||
DxDdLockDirectDrawSurface(HANDLE hDdSurface)
|
||||
{
|
||||
PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
|
||||
PEDD_SURFACE pEDDSurface = NULL;
|
||||
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
|
||||
|
||||
pSurfacelcl = DdHmgLock(hDdSurface, 2, FALSE);
|
||||
if (pSurfacelcl != NULL)
|
||||
pEDDSurface = DdHmgLock(hDdSurface, 2, FALSE);
|
||||
if (pEDDSurface != NULL)
|
||||
{
|
||||
pSurfacelcl = &pEDDSurfacelcl->Surfacelcl;
|
||||
pSurfacelcl = &pEDDSurface->ddsSurfaceLocal;
|
||||
}
|
||||
|
||||
return pSurfacelcl;
|
||||
|
@ -33,12 +33,12 @@ STDCALL
|
|||
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
|
||||
{
|
||||
BOOL retVal = FALSE;
|
||||
PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
|
||||
PEDD_SURFACE pEDDSurface = NULL;
|
||||
|
||||
if (pSurface)
|
||||
{
|
||||
pEDDSurfacelcl = (PEDD_SURFACE_LOCAL)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
|
||||
InterlockedDecrement(&pEDDSurfacelcl->Object.cExclusiveLock);
|
||||
pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
|
||||
InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock);
|
||||
retVal = TRUE;
|
||||
}
|
||||
|
||||
|
|
|
@ -2,15 +2,20 @@
|
|||
#ifndef _DXINTERNEL_
|
||||
#define _DXINTERNEL_
|
||||
|
||||
typedef struct _DD_BASEOBJECT
|
||||
{
|
||||
HANDLE hHmgr;
|
||||
ULONG ulShareCount;
|
||||
LONG cExclusiveLock;
|
||||
PVOID Tid;
|
||||
} DD_BASEOBJECT, *PDD_BASEOBJECT;
|
||||
|
||||
typedef struct _EDD_DIRECTDRAW_LOCAL
|
||||
{
|
||||
//
|
||||
// GDI Object Header
|
||||
//
|
||||
HANDLE hHmgr;
|
||||
PVOID pEntry;
|
||||
INT cExcLock;
|
||||
HANDLE Tid;
|
||||
DD_BASEOBJECT pobj;
|
||||
|
||||
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal;
|
||||
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2;
|
||||
|
@ -35,10 +40,7 @@ typedef struct _EDD_SURFACE
|
|||
//
|
||||
// GDI Object Header
|
||||
//
|
||||
HANDLE hHmgr;
|
||||
PVOID pEntry;
|
||||
INT cExcLock;
|
||||
HANDLE Tid;
|
||||
DD_BASEOBJECT pobj;
|
||||
|
||||
//
|
||||
// Direct Draw Surface Data
|
||||
|
|
Loading…
Reference in a new issue