mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 00:55:48 +00:00
more cleanup,
1. fixed more tab to space 2. rewrite addref for some inteface. svn path=/trunk/; revision=25149
This commit is contained in:
parent
b7bb710426
commit
82d454c95b
8 changed files with 140 additions and 197 deletions
|
@ -14,44 +14,34 @@
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
|
DirectDrawClipper_Release(LPDIRECTDRAWCLIPPER iface)
|
||||||
{
|
{
|
||||||
|
|
||||||
LPDDRAWI_DDRAWCLIPPER_INT This = (LPDDRAWI_DDRAWCLIPPER_INT)iface;
|
LPDDRAWI_DDRAWCLIPPER_INT This = (LPDDRAWI_DDRAWCLIPPER_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
ref = InterlockedDecrement( (PLONG) &This->dwIntRefCnt);
|
|
||||||
|
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER iface)
|
DirectDrawClipper_AddRef (LPDIRECTDRAWCLIPPER iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDRAWCLIPPER_INT This = (LPDDRAWI_DDRAWCLIPPER_INT)iface;
|
LPDDRAWI_DDRAWCLIPPER_INT This = (LPDDRAWI_DDRAWCLIPPER_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
ref = InterlockedIncrement( (PLONG) &This->dwIntRefCnt);
|
This->dwIntRefCnt++;
|
||||||
|
This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
if (This->lpLcl->lpGbl != NULL)
|
||||||
|
{
|
||||||
|
This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
}
|
}
|
||||||
return ref;
|
}
|
||||||
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -14,42 +14,34 @@ ULONG WINAPI
|
||||||
DirectDrawColorControl_AddRef( LPDIRECTDRAWCOLORCONTROL iface)
|
DirectDrawColorControl_AddRef( LPDIRECTDRAWCOLORCONTROL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDCOLORCONTROL_INT This = (LPDDRAWI_DDCOLORCONTROL_INT)iface;
|
LPDDRAWI_DDCOLORCONTROL_INT This = (LPDDRAWI_DDCOLORCONTROL_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
ref = InterlockedIncrement( (PLONG) &This->dwIntRefCnt);
|
This->dwIntRefCnt++;
|
||||||
|
// This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return ref;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DirectDrawColorControl_Release( LPDIRECTDRAWCOLORCONTROL iface)
|
DirectDrawColorControl_Release( LPDIRECTDRAWCOLORCONTROL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDCOLORCONTROL_INT This = (LPDDRAWI_DDCOLORCONTROL_INT)iface;
|
LPDDRAWI_DDCOLORCONTROL_INT This = (LPDDRAWI_DDCOLORCONTROL_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
ref = InterlockedDecrement( (PLONG) &This->dwIntRefCnt);
|
|
||||||
|
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -15,44 +15,32 @@ DirectDrawGammaControl_AddRef( LPDIRECTDRAWGAMMACONTROL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDGAMMACONTROL_INT This = (LPDDRAWI_DDGAMMACONTROL_INT)iface;
|
LPDDRAWI_DDGAMMACONTROL_INT This = (LPDDRAWI_DDGAMMACONTROL_INT)iface;
|
||||||
|
|
||||||
ULONG ref=0;
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
This->dwIntRefCnt++;
|
This->dwIntRefCnt++;
|
||||||
ref = This->dwIntRefCnt;
|
//This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return ref;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DirectDrawGammaControl_Release( LPDIRECTDRAWGAMMACONTROL iface)
|
DirectDrawGammaControl_Release( LPDIRECTDRAWGAMMACONTROL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDGAMMACONTROL_INT This = (LPDDRAWI_DDGAMMACONTROL_INT)iface;
|
LPDDRAWI_DDGAMMACONTROL_INT This = (LPDDRAWI_DDGAMMACONTROL_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
This->dwIntRefCnt--;
|
|
||||||
|
|
||||||
if (This->dwIntRefCnt == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ref = This->dwIntRefCnt;
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -89,44 +89,32 @@ DDSurfaceKernel_AddRef ( LPDIRECTDRAWSURFACEKERNEL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDKERNELSURFACE_INT This = (LPDDRAWI_DDKERNELSURFACE_INT)iface;
|
LPDDRAWI_DDKERNELSURFACE_INT This = (LPDDRAWI_DDKERNELSURFACE_INT)iface;
|
||||||
|
|
||||||
ULONG ref=0;
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
This->dwIntRefCnt++;
|
This->dwIntRefCnt++;
|
||||||
ref = This->dwIntRefCnt;
|
//This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return ref;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DDSurfaceKernel_Release ( LPDIRECTDRAWSURFACEKERNEL iface)
|
DDSurfaceKernel_Release ( LPDIRECTDRAWSURFACEKERNEL iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDKERNELSURFACE_INT This = (LPDDRAWI_DDKERNELSURFACE_INT)iface;
|
LPDDRAWI_DDKERNELSURFACE_INT This = (LPDDRAWI_DDKERNELSURFACE_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
This->dwIntRefCnt--;
|
|
||||||
|
|
||||||
if (This->dwIntRefCnt == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ref = This->dwIntRefCnt;
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -14,42 +14,33 @@ ULONG WINAPI
|
||||||
DirectDrawPalette_Release( LPDIRECTDRAWPALETTE iface)
|
DirectDrawPalette_Release( LPDIRECTDRAWPALETTE iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDRAWPALETTE_INT This = (LPDDRAWI_DDRAWPALETTE_INT)iface;
|
LPDDRAWI_DDRAWPALETTE_INT This = (LPDDRAWI_DDRAWPALETTE_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
ref = InterlockedDecrement( (PLONG) &This->dwIntRefCnt);
|
|
||||||
|
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
DxHeapMemFree(This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
DirectDrawPalette_AddRef( LPDIRECTDRAWPALETTE iface)
|
DirectDrawPalette_AddRef( LPDIRECTDRAWPALETTE iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDRAWPALETTE_INT This = (LPDDRAWI_DDRAWPALETTE_INT)iface;
|
LPDDRAWI_DDRAWPALETTE_INT This = (LPDDRAWI_DDRAWPALETTE_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
ref = InterlockedIncrement( (PLONG) &This->dwIntRefCnt);
|
This->dwIntRefCnt++;
|
||||||
|
This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
if (This->lpLcl->lpGbl != NULL)
|
||||||
|
{
|
||||||
|
This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
}
|
}
|
||||||
return ref;
|
}
|
||||||
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -25,42 +25,33 @@ ULONG WINAPI
|
||||||
Main_DirectDrawVideoPort_AddRef (LPDIRECTDRAWVIDEOPORT iface)
|
Main_DirectDrawVideoPort_AddRef (LPDIRECTDRAWVIDEOPORT iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDVIDEOPORT_INT This = (LPDDRAWI_DDVIDEOPORT_INT)iface;
|
LPDDRAWI_DDVIDEOPORT_INT This = (LPDDRAWI_DDVIDEOPORT_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
ref = InterlockedIncrement( (PLONG) &This->dwIntRefCnt);
|
This->dwIntRefCnt++;
|
||||||
|
//This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
return ref;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI
|
ULONG WINAPI
|
||||||
Main_DirectDrawVideoPort_Release (LPDIRECTDRAWVIDEOPORT iface)
|
Main_DirectDrawVideoPort_Release (LPDIRECTDRAWVIDEOPORT iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDVIDEOPORT_INT This = (LPDDRAWI_DDVIDEOPORT_INT)iface;
|
LPDDRAWI_DDVIDEOPORT_INT This = (LPDDRAWI_DDVIDEOPORT_INT)iface;
|
||||||
ULONG ref=0;
|
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
/* FIXME
|
||||||
if (iface!=NULL)
|
This is not right exiame how it should be done
|
||||||
{
|
|
||||||
ref = InterlockedDecrement( (PLONG) &This->dwIntRefCnt);
|
|
||||||
|
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
*/
|
||||||
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
if (This!=NULL)
|
return This->dwIntRefCnt;
|
||||||
{
|
|
||||||
DxHeapMemFree(This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -45,6 +45,7 @@ ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
|
||||||
return This->dwIntRefCnt;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
|
ULONG WINAPI Main_DDrawSurface_Release(LPDIRECTDRAWSURFACE7 iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
|
LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
|
||||||
|
|
|
@ -650,6 +650,8 @@ DWORD CALLBACK HelDdSurfUpdateOverlay(LPDDHAL_UPDATEOVERLAYDATA lpUpDateOveryLay
|
||||||
} \
|
} \
|
||||||
return DDERR_UNSUPPORTED;
|
return DDERR_UNSUPPORTED;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define DX_STUB_DD_OK \
|
#define DX_STUB_DD_OK \
|
||||||
{ \
|
{ \
|
||||||
static BOOL firstcall = TRUE; \
|
static BOOL firstcall = TRUE; \
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue