1
0
mirror of https://github.com/FunkyFr3sh/cnc-ddraw.git synced 2025-03-24 17:49:52 +01:00

improve logging

This commit is contained in:
FunkyFr3sh 2018-10-26 10:34:45 +02:00
parent 88faf16fd9
commit 202e4eb869
2 changed files with 22 additions and 7 deletions

View File

@ -160,8 +160,9 @@ HRESULT __stdcall ddraw_EnumDisplayModes(IDirectDrawImpl *This, DWORD dwFlags, L
while (EnumDisplaySettings(NULL, i, &m)) while (EnumDisplaySettings(NULL, i, &m))
{ {
#if _DEBUG_X
printf(" %d: %dx%d@%d %d bpp\n", (int)i, (int)m.dmPelsWidth, (int)m.dmPelsHeight, (int)m.dmDisplayFrequency, (int)m.dmBitsPerPel); printf(" %d: %dx%d@%d %d bpp\n", (int)i, (int)m.dmPelsWidth, (int)m.dmPelsHeight, (int)m.dmDisplayFrequency, (int)m.dmBitsPerPel);
#endif
memset(&s, 0, sizeof(DDSURFACEDESC)); memset(&s, 0, sizeof(DDSURFACEDESC));
s.dwSize = sizeof(DDSURFACEDESC); s.dwSize = sizeof(DDSURFACEDESC);
s.dwFlags = DDSD_HEIGHT | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT; s.dwFlags = DDSD_HEIGHT | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT;

View File

@ -181,22 +181,22 @@ HRESULT __stdcall ddraw_surface_BltFast(IDirectDrawSurfaceImpl *This, DWORD dst_
#if _DEBUG_X #if _DEBUG_X
printf("IDirectDrawSurface::BltFast(This=%p, ...)\n", This); printf("IDirectDrawSurface::BltFast(This=%p, ...)\n", This);
#endif
if (flags & DDBLTFAST_NOCOLORKEY) if (flags & DDBLTFAST_NOCOLORKEY)
{ {
printf("IDirectDrawSurface::BltFast(This=%p, ...) ??? DDBLTFAST_NOCOLORKEY\n", This); printf(" DDBLTFAST_NOCOLORKEY\n");
} }
if (flags & DDBLTFAST_SRCCOLORKEY) if (flags & DDBLTFAST_SRCCOLORKEY)
{ {
printf("IDirectDrawSurface::BltFast(This=%p, ...) ??? DDBLTFAST_SRCCOLORKEY\n", This); printf(" DDBLTFAST_SRCCOLORKEY\n");
} }
if (flags & DDBLTFAST_DESTCOLORKEY) if (flags & DDBLTFAST_DESTCOLORKEY)
{ {
printf("IDirectDrawSurface::BltFast(This=%p, ...) ??? DDBLTFAST_DESTCOLORKEY\n", This); printf(" DDBLTFAST_DESTCOLORKEY\n");
} }
#endif
if (Source) if (Source)
{ {
@ -359,7 +359,9 @@ HRESULT __stdcall ddraw_surface_GetCaps(IDirectDrawSurfaceImpl *This, LPDDSCAPS
HRESULT __stdcall ddraw_surface_GetClipper(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWCLIPPER FAR *a) HRESULT __stdcall ddraw_surface_GetClipper(IDirectDrawSurfaceImpl *This, LPDIRECTDRAWCLIPPER FAR *a)
{ {
#if _DEBUG_X
printf("IDirectDrawSurface::GetClipper(This=%p, ...) ???\n", This); printf("IDirectDrawSurface::GetClipper(This=%p, ...) ???\n", This);
#endif
return DD_OK; return DD_OK;
} }
@ -371,7 +373,9 @@ HRESULT __stdcall ddraw_surface_GetColorKey(IDirectDrawSurfaceImpl *This, DWORD
HRESULT __stdcall ddraw_surface_GetDC(IDirectDrawSurfaceImpl *This, HDC FAR *a) HRESULT __stdcall ddraw_surface_GetDC(IDirectDrawSurfaceImpl *This, HDC FAR *a)
{ {
#if _DEBUG_X
printf("IDirectDrawSurface::GetDC(This=%p, ...)\n", This); printf("IDirectDrawSurface::GetDC(This=%p, ...)\n", This);
#endif
*a = This->hDC; *a = This->hDC;
return DD_OK; return DD_OK;
} }
@ -447,7 +451,9 @@ HRESULT __stdcall ddraw_surface_Lock(IDirectDrawSurfaceImpl *This, LPRECT lpDest
HRESULT __stdcall ddraw_surface_ReleaseDC(IDirectDrawSurfaceImpl *This, HDC a) HRESULT __stdcall ddraw_surface_ReleaseDC(IDirectDrawSurfaceImpl *This, HDC a)
{ {
#if _DEBUG_X
printf("DirectDrawSurface::ReleaseDC(This=%p, ...)\n", This); printf("DirectDrawSurface::ReleaseDC(This=%p, ...)\n", This);
#endif
return DD_OK; return DD_OK;
} }
@ -465,8 +471,16 @@ HRESULT __stdcall ddraw_surface_SetClipper(IDirectDrawSurfaceImpl *This, LPDIREC
HRESULT __stdcall ddraw_surface_SetColorKey(IDirectDrawSurfaceImpl *This, DWORD flags, LPDDCOLORKEY colorKey) HRESULT __stdcall ddraw_surface_SetColorKey(IDirectDrawSurfaceImpl *This, DWORD flags, LPDDCOLORKEY colorKey)
{ {
printf("DirectDrawSurface::SetColorKey(This=%p, ...) ???\n", This); #if _DEBUG_X
printf("DirectDrawSurface::SetColorKey(This=%p, flags=0x%08X, colorKey=%p) ???\n", This, flags, colorKey);
if (colorKey)
{
printf(" dwColorSpaceHighValue=%d\n", colorKey->dwColorSpaceHighValue);
printf(" dwColorSpaceLowValue=%d\n", colorKey->dwColorSpaceLowValue);
}
#endif
This->colorKey.dwColorSpaceHighValue = colorKey->dwColorSpaceHighValue; This->colorKey.dwColorSpaceHighValue = colorKey->dwColorSpaceHighValue;
This->colorKey.dwColorSpaceLowValue = colorKey->dwColorSpaceLowValue; This->colorKey.dwColorSpaceLowValue = colorKey->dwColorSpaceLowValue;