mirror of
https://github.com/reactos/reactos.git
synced 2025-06-10 20:34:59 +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
|
@ -13,45 +13,35 @@
|
||||||
|
|
||||||
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);
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
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++;
|
||||||
return ref;
|
|
||||||
|
if (This->lpLcl->lpGbl != NULL)
|
||||||
|
{
|
||||||
|
This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -13,48 +13,40 @@
|
||||||
ULONG WINAPI
|
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++;
|
||||||
return ref;
|
|
||||||
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
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);
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
DirectDrawColorControl_QueryInterface( LPDIRECTDRAWCOLORCONTROL iface,
|
DirectDrawColorControl_QueryInterface( LPDIRECTDRAWCOLORCONTROL iface,
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
LPVOID* ppvObj)
|
LPVOID* ppvObj)
|
||||||
{
|
{
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
|
@ -15,53 +15,41 @@ 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++;
|
//This->lpLcl->dwLocalRefCnt++;
|
||||||
ref = This->dwIntRefCnt;
|
|
||||||
}
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
return ref;
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
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--;
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (This->dwIntRefCnt == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
HeapFree(GetProcessHeap(), 0, This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ref = This->dwIntRefCnt;
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
DirectDrawGammaControl_QueryInterface( LPDIRECTDRAWGAMMACONTROL iface,
|
DirectDrawGammaControl_QueryInterface( LPDIRECTDRAWGAMMACONTROL iface,
|
||||||
REFIID riid,
|
REFIID riid,
|
||||||
LPVOID *ppObj)
|
LPVOID *ppObj)
|
||||||
{
|
{
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
DX_STUB;
|
DX_STUB;
|
||||||
}
|
}
|
||||||
|
|
||||||
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++;
|
||||||
}
|
|
||||||
return ref;
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
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--;
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (This->dwIntRefCnt == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
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);
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
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++;
|
||||||
return ref;
|
|
||||||
|
if (This->lpLcl->lpGbl != NULL)
|
||||||
|
{
|
||||||
|
This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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++;
|
||||||
return ref;
|
|
||||||
|
//if (This->lpLcl->lpGbl != NULL)
|
||||||
|
//{
|
||||||
|
// This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
|
//}
|
||||||
|
}
|
||||||
|
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);
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
|
return This->dwIntRefCnt;
|
||||||
if (ref == 0)
|
|
||||||
{
|
|
||||||
/* Add here if we need releae some memory pointer before
|
|
||||||
* exists
|
|
||||||
*/
|
|
||||||
|
|
||||||
if (This!=NULL)
|
|
||||||
{
|
|
||||||
DxHeapMemFree(This);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return ref;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HRESULT WINAPI
|
HRESULT WINAPI
|
||||||
|
|
|
@ -22,37 +22,38 @@
|
||||||
|
|
||||||
|
|
||||||
HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD2)
|
HRESULT WINAPI Main_DDrawSurface_Initialize (LPDIRECTDRAWSURFACE7 iface, LPDIRECTDRAW pDD, LPDDSURFACEDESC2 pDDSD2)
|
||||||
{
|
{
|
||||||
return DDERR_ALREADYINITIALIZED;
|
return DDERR_ALREADYINITIALIZED;
|
||||||
}
|
}
|
||||||
|
|
||||||
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
|
ULONG WINAPI Main_DDrawSurface_AddRef(LPDIRECTDRAWSURFACE7 iface)
|
||||||
{
|
{
|
||||||
LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
|
LPDDRAWI_DDRAWSURFACE_INT This = (LPDDRAWI_DDRAWSURFACE_INT)iface;
|
||||||
|
|
||||||
DX_WINDBG_trace();
|
DX_WINDBG_trace();
|
||||||
|
|
||||||
if (iface!=NULL)
|
if (iface!=NULL)
|
||||||
{
|
{
|
||||||
This->dwIntRefCnt++;
|
This->dwIntRefCnt++;
|
||||||
This->lpLcl->dwLocalRefCnt++;
|
This->lpLcl->dwLocalRefCnt++;
|
||||||
|
|
||||||
if (This->lpLcl->lpGbl != NULL)
|
if (This->lpLcl->lpGbl != NULL)
|
||||||
{
|
{
|
||||||
This->lpLcl->lpGbl->dwRefCnt++;
|
This->lpLcl->lpGbl->dwRefCnt++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
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;
|
||||||
|
|
||||||
/* FIXME
|
/* FIXME
|
||||||
This is not right exiame how it should be done
|
This is not right exiame how it should be done
|
||||||
*/
|
*/
|
||||||
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
DX_STUB_str("FIXME This is not right exiame how it should be done\n");
|
||||||
return This->dwIntRefCnt;
|
return This->dwIntRefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -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