1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-15 14:14:47 +01:00

add some more debugging code

This commit is contained in:
FunkyFr3sh 2018-11-19 07:40:07 +01:00
parent c434e74216
commit add701a7f6
4 changed files with 13 additions and 0 deletions

View File

@ -41,6 +41,8 @@ ULONG __stdcall ddraw_clipper_Release(IDirectDrawClipperImpl *This)
if(This->Ref == 0)
{
printf(" Released (%p)\n", This);
HeapFree(GetProcessHeap(), 0, This);
return 0;
}

View File

@ -1309,6 +1309,8 @@ ULONG __stdcall ddraw_Release(IDirectDrawImpl *This)
if(This->Ref == 0)
{
printf(" Released (%p)\n", This);
if(This->render.run)
{
EnterCriticalSection(&This->cs);

View File

@ -93,6 +93,8 @@ ULONG __stdcall ddraw_palette_Release(IDirectDrawPaletteImpl *This)
if(This->Ref == 0)
{
printf(" Released (%p)\n", This);
LastFreedPalette = This;
HeapFree(GetProcessHeap(), 0, This);
return 0;

View File

@ -57,6 +57,8 @@ ULONG __stdcall ddraw_surface_Release(IDirectDrawSurfaceImpl *This)
if(This->Ref == 0)
{
printf(" Released (%p)\n", This);
if(This->caps & DDSCAPS_PRIMARYSURFACE)
{
EnterCriticalSection(&ddraw->cs);
@ -731,7 +733,9 @@ HRESULT __stdcall ddraw_surface_GetDC(IDirectDrawSurfaceImpl *This, HDC FAR *a)
HRESULT __stdcall ddraw_surface_GetFlipStatus(IDirectDrawSurfaceImpl *This, DWORD a)
{
#if _DEBUG_X
printf("IDirectDrawSurface::GetFlipStatus(This=%p, ...) ???\n", This);
#endif
return DD_OK;
}
@ -1064,6 +1068,9 @@ HRESULT __stdcall ddraw_CreateSurface(IDirectDrawImpl *This, LPDDSURFACEDESC lpD
SelectObject(Surface->hDC, Surface->bitmap);
}
if (lpDDSurfaceDesc->dwFlags & DDSD_BACKBUFFERCOUNT)
printf(" dwBackBufferCount=%d\n", lpDDSurfaceDesc->dwBackBufferCount);
printf(" Surface = %p (%dx%d@%d)\n", Surface, (int)Surface->width, (int)Surface->height, (int)Surface->bpp);
*lpDDSurface = (LPDIRECTDRAWSURFACE)Surface;