mirror of
https://github.com/reactos/reactos.git
synced 2025-01-04 05:20:54 +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"
|
#include "tags.h"
|
||||||
|
|
||||||
typedef struct _DD_BASEOBJECT
|
|
||||||
{
|
|
||||||
HANDLE hHmgr;
|
|
||||||
ULONG ulShareCount;
|
|
||||||
LONG cExclusiveLock;
|
|
||||||
PVOID Tid;
|
|
||||||
} DD_BASEOBJECT, *PDD_BASEOBJECT, *POBJ;
|
|
||||||
|
|
||||||
typedef struct _DD_ENTRY
|
typedef struct _DD_ENTRY
|
||||||
{
|
{
|
||||||
union
|
union
|
||||||
{
|
{
|
||||||
POBJ pobj;
|
PDD_BASEOBJECT pobj;
|
||||||
HANDLE hFree;
|
HANDLE hFree;
|
||||||
};
|
};
|
||||||
union
|
union
|
||||||
|
|
|
@ -16,13 +16,13 @@ PDD_SURFACE_LOCAL
|
||||||
STDCALL
|
STDCALL
|
||||||
DxDdLockDirectDrawSurface(HANDLE hDdSurface)
|
DxDdLockDirectDrawSurface(HANDLE hDdSurface)
|
||||||
{
|
{
|
||||||
PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
|
PEDD_SURFACE pEDDSurface = NULL;
|
||||||
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
|
PDD_SURFACE_LOCAL pSurfacelcl = NULL;
|
||||||
|
|
||||||
pSurfacelcl = DdHmgLock(hDdSurface, 2, FALSE);
|
pEDDSurface = DdHmgLock(hDdSurface, 2, FALSE);
|
||||||
if (pSurfacelcl != NULL)
|
if (pEDDSurface != NULL)
|
||||||
{
|
{
|
||||||
pSurfacelcl = &pEDDSurfacelcl->Surfacelcl;
|
pSurfacelcl = &pEDDSurface->ddsSurfaceLocal;
|
||||||
}
|
}
|
||||||
|
|
||||||
return pSurfacelcl;
|
return pSurfacelcl;
|
||||||
|
@ -33,12 +33,12 @@ STDCALL
|
||||||
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
|
DxDdUnlockDirectDrawSurface(PDD_SURFACE_LOCAL pSurface)
|
||||||
{
|
{
|
||||||
BOOL retVal = FALSE;
|
BOOL retVal = FALSE;
|
||||||
PEDD_SURFACE_LOCAL pEDDSurfacelcl = NULL;
|
PEDD_SURFACE pEDDSurface = NULL;
|
||||||
|
|
||||||
if (pSurface)
|
if (pSurface)
|
||||||
{
|
{
|
||||||
pEDDSurfacelcl = (PEDD_SURFACE_LOCAL)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
|
pEDDSurface = (PEDD_SURFACE)( ((PBYTE)pSurface) - sizeof(DD_BASEOBJECT));
|
||||||
InterlockedDecrement(&pEDDSurfacelcl->Object.cExclusiveLock);
|
InterlockedDecrement(&pEDDSurface->pobj.cExclusiveLock);
|
||||||
retVal = TRUE;
|
retVal = TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,15 +2,20 @@
|
||||||
#ifndef _DXINTERNEL_
|
#ifndef _DXINTERNEL_
|
||||||
#define _DXINTERNEL_
|
#define _DXINTERNEL_
|
||||||
|
|
||||||
|
typedef struct _DD_BASEOBJECT
|
||||||
|
{
|
||||||
|
HANDLE hHmgr;
|
||||||
|
ULONG ulShareCount;
|
||||||
|
LONG cExclusiveLock;
|
||||||
|
PVOID Tid;
|
||||||
|
} DD_BASEOBJECT, *PDD_BASEOBJECT;
|
||||||
|
|
||||||
typedef struct _EDD_DIRECTDRAW_LOCAL
|
typedef struct _EDD_DIRECTDRAW_LOCAL
|
||||||
{
|
{
|
||||||
//
|
//
|
||||||
// GDI Object Header
|
// GDI Object Header
|
||||||
//
|
//
|
||||||
HANDLE hHmgr;
|
DD_BASEOBJECT pobj;
|
||||||
PVOID pEntry;
|
|
||||||
INT cExcLock;
|
|
||||||
HANDLE Tid;
|
|
||||||
|
|
||||||
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal;
|
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal;
|
||||||
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2;
|
struct _EDD_DIRECTDRAW_GLOBAL * peDirectDrawGlobal2;
|
||||||
|
@ -35,10 +40,7 @@ typedef struct _EDD_SURFACE
|
||||||
//
|
//
|
||||||
// GDI Object Header
|
// GDI Object Header
|
||||||
//
|
//
|
||||||
HANDLE hHmgr;
|
DD_BASEOBJECT pobj;
|
||||||
PVOID pEntry;
|
|
||||||
INT cExcLock;
|
|
||||||
HANDLE Tid;
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// Direct Draw Surface Data
|
// Direct Draw Surface Data
|
||||||
|
|
Loading…
Reference in a new issue