mirror of
https://github.com/reactos/reactos.git
synced 2025-08-01 23:53:07 +00:00
Fix broke SVN after me, thx to it I found wrong ref was release in different place fixed
svn path=/trunk/; revision=18887
This commit is contained in:
parent
f872c290a7
commit
816321f878
6 changed files with 15 additions and 10 deletions
|
@ -13,8 +13,8 @@
|
||||||
|
|
||||||
ULONG WINAPI Main_DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
|
ULONG WINAPI Main_DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
ULONG ref = InterlockedDecrement(&This->ref);
|
ULONG ref = InterlockedDecrement(&This->DirectDrawGlobal.dwRefCnt);
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
|
|
@ -22,8 +22,8 @@ Main_DirectDrawColorControl_AddRef(LPDIRECTDRAWCOLORCONTROL iface)
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
Main_DirectDrawColorControl_Release(LPDIRECTDRAWCOLORCONTROL iface)
|
Main_DirectDrawColorControl_Release(LPDIRECTDRAWCOLORCONTROL iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
ULONG ref = InterlockedDecrement(&This->ref);
|
ULONG ref = InterlockedDecrement(&This->DirectDrawGlobal.dwRefCnt);
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
|
|
@ -22,8 +22,8 @@ Main_DirectDrawGammaControl_AddRef(LPDIRECTDRAWGAMMACONTROL iface)
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
Main_DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
|
Main_DirectDrawGammaControl_Release(LPDIRECTDRAWGAMMACONTROL iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
ULONG ref = InterlockedDecrement(&This->ref);
|
ULONG ref = InterlockedDecrement(&This->DirectDrawGlobal.dwRefCnt);
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
|
|
@ -21,8 +21,8 @@ Main_DirectDrawPalette_Release(LPDIRECTDRAWPALETTE iface)
|
||||||
|
|
||||||
ULONG WINAPI Main_DirectDrawPalette_AddRef(LPDIRECTDRAWPALETTE iface)
|
ULONG WINAPI Main_DirectDrawPalette_AddRef(LPDIRECTDRAWPALETTE iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawImpl* This = (IDirectDrawImpl*)iface;
|
||||||
ULONG ref = InterlockedDecrement(&This->ref);
|
ULONG ref = InterlockedDecrement(&This->DirectDrawGlobal.dwRefCnt);
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
|
|
@ -94,13 +94,14 @@ HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIREC
|
||||||
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
|
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
||||||
return InterlockedIncrement(&This->ref);
|
|
||||||
|
return InterlockedIncrement(&This->owner->DirectDrawGlobal.dsList->dwIntRefCnt);
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
|
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
|
||||||
{
|
{
|
||||||
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
IDirectDrawSurfaceImpl* This = (IDirectDrawSurfaceImpl*)iface;
|
||||||
ULONG ref = InterlockedDecrement(&This->ref);
|
ULONG ref = InterlockedDecrement(&This->owner->DirectDrawGlobal.dsList->dwIntRefCnt);
|
||||||
|
|
||||||
if (ref == 0)
|
if (ref == 0)
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
HeapFree(GetProcessHeap(), 0, This);
|
||||||
|
|
|
@ -41,6 +41,10 @@ typedef struct
|
||||||
|
|
||||||
IDirectDrawImpl* owner;
|
IDirectDrawImpl* owner;
|
||||||
|
|
||||||
|
DDRAWI_DDRAWSURFACE_GBL Global;
|
||||||
|
DDRAWI_DDRAWSURFACE_MORE More;
|
||||||
|
DDRAWI_DDRAWSURFACE_LCL Local;
|
||||||
|
|
||||||
} IDirectDrawSurfaceImpl;
|
} IDirectDrawSurfaceImpl;
|
||||||
|
|
||||||
/******** Clipper Object ********/
|
/******** Clipper Object ********/
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue