Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/ddrawex/Makefile.in | 1 - dlls/ddrawex/ddraw.c | 64 ++++++++++++++++----------------- dlls/ddrawex/main.c | 8 ++--- dlls/ddrawex/surface.c | 78 ++++++++++++++++++++-------------------- 4 files changed, 75 insertions(+), 76 deletions(-)
diff --git a/dlls/ddrawex/Makefile.in b/dlls/ddrawex/Makefile.in index 1f467777c7b..0d67f9eb07e 100644 --- a/dlls/ddrawex/Makefile.in +++ b/dlls/ddrawex/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES MODULE = ddrawex.dll IMPORTS = dxguid uuid ddraw ole32 advapi32
diff --git a/dlls/ddrawex/ddraw.c b/dlls/ddrawex/ddraw.c index 2bb7e90fa42..736cb585eb9 100644 --- a/dlls/ddrawex/ddraw.c +++ b/dlls/ddrawex/ddraw.c @@ -124,7 +124,7 @@ static ULONG WINAPI ddrawex4_AddRef(IDirectDraw4 *iface) struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface); ULONG refcount = InterlockedIncrement(&ddrawex->ref);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; } @@ -161,7 +161,7 @@ static ULONG WINAPI ddrawex4_Release(IDirectDraw4 *iface) struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface); ULONG refcount = InterlockedDecrement(&ddrawex->ref);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) { @@ -240,7 +240,7 @@ static HRESULT WINAPI ddrawex4_CreateClipper(IDirectDraw4 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown);
/* This may require a wrapper interface for clippers too which handles this. */ @@ -255,7 +255,7 @@ static HRESULT WINAPI ddrawex3_CreateClipper(IDirectDraw3 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw3(iface);
- TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown);
return ddrawex4_CreateClipper(&ddrawex->IDirectDraw4_iface, flags, clipper, outer_unknown); @@ -266,7 +266,7 @@ static HRESULT WINAPI ddrawex2_CreateClipper(IDirectDraw2 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown);
return ddrawex4_CreateClipper(&ddrawex->IDirectDraw4_iface, flags, clipper, outer_unknown); @@ -277,7 +277,7 @@ static HRESULT WINAPI ddrawex1_CreateClipper(IDirectDraw *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, flags %#x, clipper %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, clipper %p, outer_unknown %p.\n", iface, flags, clipper, outer_unknown);
return ddrawex4_CreateClipper(&ddrawex->IDirectDraw4_iface, flags, clipper, outer_unknown); @@ -288,7 +288,7 @@ static HRESULT WINAPI ddrawex4_CreatePalette(IDirectDraw4 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, flags %#x. entries %p, palette %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown);
/* This may require a wrapper interface for palettes too which handles this. */ @@ -303,7 +303,7 @@ static HRESULT WINAPI ddrawex3_CreatePalette(IDirectDraw3 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw3(iface);
- TRACE("iface %p, flags %#x. entries %p, palette %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown);
return ddrawex4_CreatePalette(&ddrawex->IDirectDraw4_iface, flags, entries, palette, outer_unknown); @@ -314,7 +314,7 @@ static HRESULT WINAPI ddrawex2_CreatePalette(IDirectDraw2 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, flags %#x. entries %p, palette %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown);
return ddrawex4_CreatePalette(&ddrawex->IDirectDraw4_iface, flags, entries, palette, outer_unknown); @@ -325,7 +325,7 @@ static HRESULT WINAPI ddrawex1_CreatePalette(IDirectDraw *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, flags %#x. entries %p, palette %p, outer_unknown %p.\n", + TRACE("iface %p, flags %#lx, entries %p, palette %p, outer_unknown %p.\n", iface, flags, entries, palette, outer_unknown);
return ddrawex4_CreatePalette(&ddrawex->IDirectDraw4_iface, flags, entries, palette, outer_unknown); @@ -546,7 +546,7 @@ static HRESULT WINAPI ddrawex4_EnumDisplayModes(IDirectDraw4 *iface, DWORD flags { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
return IDirectDraw4_EnumDisplayModes(ddrawex->parent, flags, desc, ctx, cb); } @@ -574,7 +574,7 @@ static HRESULT WINAPI ddrawex3_EnumDisplayModes(IDirectDraw3 *iface, DWORD flags struct enummodes_ctx cb_ctx; DDSURFACEDESC2 ddsd2;
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
DDSD_to_DDSD2(desc, &ddsd2); cb_ctx.orig_cb = cb; @@ -587,7 +587,7 @@ static HRESULT WINAPI ddrawex2_EnumDisplayModes(IDirectDraw2 *iface, DWORD flags { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
return ddrawex3_EnumDisplayModes(&ddrawex->IDirectDraw3_iface, flags, desc, ctx, cb); } @@ -597,7 +597,7 @@ static HRESULT WINAPI ddrawex1_EnumDisplayModes(IDirectDraw *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
return ddrawex3_EnumDisplayModes(&ddrawex->IDirectDraw3_iface, flags, desc, ctx, cb); } @@ -625,7 +625,7 @@ static HRESULT WINAPI ddrawex4_EnumSurfaces(IDirectDraw4 *iface, DWORD flags, struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface); struct enumsurfaces4_ctx cb_ctx;
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
cb_ctx.orig_cb = cb; cb_ctx.orig_ctx = ctx; @@ -661,7 +661,7 @@ static HRESULT WINAPI ddrawex3_EnumSurfaces(IDirectDraw3 *iface, DWORD flags, DDSURFACEDESC2 ddsd2; struct enumsurfaces_ctx cb_ctx;
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
DDSD_to_DDSD2(desc, &ddsd2); cb_ctx.orig_cb = cb; @@ -674,7 +674,7 @@ static HRESULT WINAPI ddrawex2_EnumSurfaces(IDirectDraw2 *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
return ddrawex3_EnumSurfaces(&ddrawex->IDirectDraw3_iface, flags, desc, ctx, cb); } @@ -684,7 +684,7 @@ static HRESULT WINAPI ddrawex1_EnumSurfaces(IDirectDraw *iface, DWORD flags, { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, flags %#x, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb); + TRACE("iface %p, flags %#lx, desc %p, ctx %p, cb %p.\n", iface, flags, desc, ctx, cb);
return ddrawex3_EnumSurfaces(&ddrawex->IDirectDraw3_iface, flags, desc, ctx, cb); } @@ -1079,7 +1079,7 @@ static HRESULT WINAPI ddrawex4_SetCooperativeLevel(IDirectDraw4 *iface, HWND win { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); + TRACE("iface %p, window %p, flags %#lx.\n", iface, window, flags);
return IDirectDraw4_SetCooperativeLevel(ddrawex->parent, window, flags); } @@ -1088,7 +1088,7 @@ static HRESULT WINAPI ddrawex3_SetCooperativeLevel(IDirectDraw3 *iface, HWND win { struct ddrawex *ddrawex = impl_from_IDirectDraw3(iface);
- TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); + TRACE("iface %p, window %p, flags %#lx.\n", iface, window, flags);
return ddrawex4_SetCooperativeLevel(&ddrawex->IDirectDraw4_iface, window, flags); } @@ -1097,7 +1097,7 @@ static HRESULT WINAPI ddrawex2_SetCooperativeLevel(IDirectDraw2 *iface, HWND win { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); + TRACE("iface %p, window %p, flags %#lx.\n", iface, window, flags);
return ddrawex4_SetCooperativeLevel(&ddrawex->IDirectDraw4_iface, window, flags); } @@ -1106,7 +1106,7 @@ static HRESULT WINAPI ddrawex1_SetCooperativeLevel(IDirectDraw *iface, HWND wind { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, window %p, flags %#x.\n", iface, window, flags); + TRACE("iface %p, window %p, flags %#lx.\n", iface, window, flags);
return ddrawex4_SetCooperativeLevel(&ddrawex->IDirectDraw4_iface, window, flags); } @@ -1116,7 +1116,7 @@ static HRESULT WINAPI ddrawex4_SetDisplayMode(IDirectDraw4 *iface, DWORD width, { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", + TRACE("iface %p, width %lu, height %lu, bpp %lu, refresh_rate %lu, flags %#lx.\n", iface, width, height, bpp, refresh_rate, flags);
return IDirectDraw4_SetDisplayMode(ddrawex->parent, width, height, bpp, refresh_rate, flags); @@ -1127,7 +1127,7 @@ static HRESULT WINAPI ddrawex3_SetDisplayMode(IDirectDraw3 *iface, DWORD width, { struct ddrawex *ddrawex = impl_from_IDirectDraw3(iface);
- TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", + TRACE("iface %p, width %lu, height %lu, bpp %lu, refresh_rate %lu, flags %#lx.\n", iface, width, height, bpp, refresh_rate, flags);
return ddrawex4_SetDisplayMode(&ddrawex->IDirectDraw4_iface, width, height, bpp, refresh_rate, flags); @@ -1138,7 +1138,7 @@ static HRESULT WINAPI ddrawex2_SetDisplayMode(IDirectDraw2 *iface, DWORD width, { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, width %u, height %u, bpp %u, refresh_rate %u, flags %#x.\n", + TRACE("iface %p, width %lu, height %lu, bpp %lu, refresh_rate %lu, flags %#lx.\n", iface, width, height, bpp, refresh_rate, flags);
return ddrawex4_SetDisplayMode(&ddrawex->IDirectDraw4_iface, width, height, bpp, refresh_rate, flags); @@ -1149,7 +1149,7 @@ static HRESULT WINAPI ddrawex1_SetDisplayMode(IDirectDraw *iface, DWORD width, { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, width %u, height %u, bpp %u.\n", iface, width, height, bpp); + TRACE("iface %p, width %lu, height %lu, bpp %lu.\n", iface, width, height, bpp);
return ddrawex4_SetDisplayMode(&ddrawex->IDirectDraw4_iface, width, height, bpp, 0, 0); } @@ -1158,7 +1158,7 @@ static HRESULT WINAPI ddrawex4_WaitForVerticalBlank(IDirectDraw4 *iface, DWORD f { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); + TRACE("iface %p, flags %#lx, event %p.\n", iface, flags, event);
return IDirectDraw4_WaitForVerticalBlank(ddrawex->parent, flags, event); } @@ -1167,7 +1167,7 @@ static HRESULT WINAPI ddrawex3_WaitForVerticalBlank(IDirectDraw3 *iface, DWORD f { struct ddrawex *ddrawex = impl_from_IDirectDraw3(iface);
- TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); + TRACE("iface %p, flags %#lx, event %p.\n", iface, flags, event);
return ddrawex4_WaitForVerticalBlank(&ddrawex->IDirectDraw4_iface, flags, event); } @@ -1176,7 +1176,7 @@ static HRESULT WINAPI ddrawex2_WaitForVerticalBlank(IDirectDraw2 *iface, DWORD f { struct ddrawex *ddrawex = impl_from_IDirectDraw2(iface);
- TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); + TRACE("iface %p, flags %#lx, event %p.\n", iface, flags, event);
return ddrawex4_WaitForVerticalBlank(&ddrawex->IDirectDraw4_iface, flags, event); } @@ -1185,7 +1185,7 @@ static HRESULT WINAPI ddrawex1_WaitForVerticalBlank(IDirectDraw *iface, DWORD fl { struct ddrawex *ddrawex = impl_from_IDirectDraw(iface);
- TRACE("iface %p, flags %#x, event %p.\n", iface, flags, event); + TRACE("iface %p, flags %#lx, event %p.\n", iface, flags, event);
return ddrawex4_WaitForVerticalBlank(&ddrawex->IDirectDraw4_iface, flags, event); } @@ -1292,7 +1292,7 @@ static HRESULT WINAPI ddrawex4_GetDeviceIdentifier(IDirectDraw4 *iface, { struct ddrawex *ddrawex = impl_from_IDirectDraw4(iface);
- TRACE("iface %p, identifier %p, flags %#x.\n", iface, identifier, flags); + TRACE("iface %p, identifier %p, flags %#lx.\n", iface, identifier, flags);
return IDirectDraw4_GetDeviceIdentifier(ddrawex->parent, identifier, flags); } @@ -1420,7 +1420,7 @@ HRESULT WINAPI ddrawex_factory_CreateDirectDraw(IDirectDrawFactory *iface, GUID struct ddrawex *object; HRESULT hr;
- TRACE("iface %p, guid %s, window %p, coop_level %#x, reserved %#x, outer_unknown %p, ddraw %p.\n", + TRACE("iface %p, guid %s, window %p, coop_level %#lx, reserved %#lx, outer_unknown %p, ddraw %p.\n", iface, debugstr_guid(guid), window, coop_level, reserved, outer_unknown, ddraw);
if (outer_unknown) diff --git a/dlls/ddrawex/main.c b/dlls/ddrawex/main.c index 8ecc24f824c..fd6d7219c12 100644 --- a/dlls/ddrawex/main.c +++ b/dlls/ddrawex/main.c @@ -69,7 +69,7 @@ static ULONG WINAPI ddrawex_class_factory_AddRef(IClassFactory *iface) struct ddrawex_class_factory *factory = impl_from_IClassFactory(iface); ULONG refcount = InterlockedIncrement(&factory->ref);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; } @@ -79,7 +79,7 @@ static ULONG WINAPI ddrawex_class_factory_Release(IClassFactory *iface) struct ddrawex_class_factory *factory = impl_from_IClassFactory(iface); ULONG refcount = InterlockedDecrement(&factory->ref);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) heap_free(factory); @@ -148,7 +148,7 @@ static ULONG WINAPI ddrawex_factory_AddRef(IDirectDrawFactory *iface) struct ddrawex_factory *factory = impl_from_IDirectDrawFactory(iface); ULONG refcount = InterlockedIncrement(&factory->ref);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; } @@ -158,7 +158,7 @@ static ULONG WINAPI ddrawex_factory_Release(IDirectDrawFactory *iface) struct ddrawex_factory *factory = impl_from_IDirectDrawFactory(iface); ULONG refcount = InterlockedDecrement(&factory->ref);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) heap_free(factory); diff --git a/dlls/ddrawex/surface.c b/dlls/ddrawex/surface.c index 9fcda86979f..cc18494905c 100644 --- a/dlls/ddrawex/surface.c +++ b/dlls/ddrawex/surface.c @@ -99,7 +99,7 @@ static ULONG WINAPI ddrawex_surface4_AddRef(IDirectDrawSurface4 *iface) struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); ULONG refcount = InterlockedIncrement(&surface->ref);
- TRACE("%p increasing refcount to %u.\n", iface, refcount); + TRACE("%p increasing refcount to %lu.\n", iface, refcount);
return refcount; } @@ -118,7 +118,7 @@ static ULONG WINAPI ddrawex_surface4_Release(IDirectDrawSurface4 *iface) struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); ULONG refcount = InterlockedDecrement(&surface->ref);
- TRACE("%p decreasing refcount to %u.\n", iface, refcount); + TRACE("%p decreasing refcount to %lu.\n", iface, refcount);
if (!refcount) { @@ -186,7 +186,7 @@ static HRESULT WINAPI ddrawex_surface4_Blt(IDirectDrawSurface4 *iface, RECT *dst struct ddrawex_surface *dst = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *src = unsafe_impl_from_IDirectDrawSurface4(src_surface);
- TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n", + TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#lx, fx %p.\n", iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
return IDirectDrawSurface4_Blt(dst->parent, dst_rect, src ? src->parent : NULL, src_rect, flags, fx); @@ -198,7 +198,7 @@ static HRESULT WINAPI ddrawex_surface3_Blt(IDirectDrawSurface3 *iface, RECT *dst struct ddrawex_surface *dst = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *src = unsafe_impl_from_IDirectDrawSurface3(src_surface);
- TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#x, fx %p.\n", + TRACE("iface %p, dst_rect %s, src_surface %p, src_rect %s, flags %#lx, fx %p.\n", iface, wine_dbgstr_rect(dst_rect), src_surface, wine_dbgstr_rect(src_rect), flags, fx);
return ddrawex_surface4_Blt(&dst->IDirectDrawSurface4_iface, dst_rect, @@ -210,7 +210,7 @@ static HRESULT WINAPI ddrawex_surface4_BltBatch(IDirectDrawSurface4 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags); + TRACE("iface %p, batch %p, count %lu, flags %#lx.\n", iface, batch, count, flags);
return IDirectDrawSurface4_BltBatch(surface->parent, batch, count, flags); } @@ -220,7 +220,7 @@ static HRESULT WINAPI ddrawex_surface3_BltBatch(IDirectDrawSurface3 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, batch %p, count %u, flags %#x.\n", iface, batch, count, flags); + TRACE("iface %p, batch %p, count %lu, flags %#lx.\n", iface, batch, count, flags);
return ddrawex_surface4_BltBatch(&surface->IDirectDrawSurface4_iface, batch, count, flags); } @@ -231,7 +231,7 @@ static HRESULT WINAPI ddrawex_surface4_BltFast(IDirectDrawSurface4 *iface, DWORD struct ddrawex_surface *dst = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *src = unsafe_impl_from_IDirectDrawSurface4(src_surface);
- TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", + TRACE("iface %p, dst_x %lu, dst_y %lu, src_surface %p, src_rect %s, flags %#lx.\n", iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
return IDirectDrawSurface4_BltFast(dst->parent, dst_x, dst_y, @@ -244,7 +244,7 @@ static HRESULT WINAPI ddrawex_surface3_BltFast(IDirectDrawSurface3 *iface, DWORD struct ddrawex_surface *dst = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *src = unsafe_impl_from_IDirectDrawSurface3(src_surface);
- TRACE("iface %p, dst_x %u, dst_y %u, src_surface %p, src_rect %s, flags %#x.\n", + TRACE("iface %p, dst_x %lu, dst_y %lu, src_surface %p, src_rect %s, flags %#lx.\n", iface, dst_x, dst_y, src_surface, wine_dbgstr_rect(src_rect), flags);
return ddrawex_surface4_BltFast(&dst->IDirectDrawSurface4_iface, dst_x, dst_y, @@ -257,7 +257,7 @@ static HRESULT WINAPI ddrawex_surface4_DeleteAttachedSurface(IDirectDrawSurface4 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *attachment_impl = unsafe_impl_from_IDirectDrawSurface4(attachment);
- TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment); + TRACE("iface %p, flags %#lx, attachment %p.\n", iface, flags, attachment);
return IDirectDrawSurface4_DeleteAttachedSurface(surface->parent, flags, attachment_impl ? attachment_impl->parent : NULL); @@ -269,7 +269,7 @@ static HRESULT WINAPI ddrawex_surface3_DeleteAttachedSurface(IDirectDrawSurface3 struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *attachment_impl = unsafe_impl_from_IDirectDrawSurface3(attachment);
- TRACE("iface %p, flags %#x, attachment %p.\n", iface, flags, attachment); + TRACE("iface %p, flags %#lx, attachment %p.\n", iface, flags, attachment);
return ddrawex_surface4_DeleteAttachedSurface(&surface->IDirectDrawSurface4_iface, flags, attachment_impl ? &attachment_impl->IDirectDrawSurface4_iface : NULL); @@ -345,7 +345,7 @@ static HRESULT WINAPI ddrawex_surface4_EnumOverlayZOrders(IDirectDrawSurface4 *i struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); struct enumsurfaces_wrap cb_ctx;
- TRACE("iface %p, flags %#x, ctx %p, cb %p.\n", iface, flags, ctx, cb); + TRACE("iface %p, flags %#lx, ctx %p, cb %p.\n", iface, flags, ctx, cb);
cb_ctx.orig_cb = cb; cb_ctx.orig_ctx = ctx; @@ -358,7 +358,7 @@ static HRESULT WINAPI ddrawex_surface3_EnumOverlayZOrders(IDirectDrawSurface3 *i struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface); struct enumsurfaces_thunk cb_ctx;
- TRACE("iface %p, flags %#x, ctx %p, cb %p.\n", iface, flags, ctx, cb); + TRACE("iface %p, flags %#lx, ctx %p, cb %p.\n", iface, flags, ctx, cb);
cb_ctx.orig_cb = cb; cb_ctx.orig_ctx = ctx; @@ -371,7 +371,7 @@ static HRESULT WINAPI ddrawex_surface4_Flip(IDirectDrawSurface4 *iface, IDirectD struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface4(dst);
- TRACE("iface %p, dst %p, flags %#x.\n", iface, dst, flags); + TRACE("iface %p, dst %p, flags %#lx.\n", iface, dst, flags);
return IDirectDrawSurface4_Flip(surface->parent, dst_impl ? dst_impl->parent : NULL, flags); } @@ -381,7 +381,7 @@ static HRESULT WINAPI ddrawex_surface3_Flip(IDirectDrawSurface3 *iface, IDirectD struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface3(dst);
- TRACE("iface %p, dst %p, flags %#x.\n", iface, dst, flags); + TRACE("iface %p, dst %p, flags %#lx.\n", iface, dst, flags);
return ddrawex_surface4_Flip(&surface->IDirectDrawSurface4_iface, dst_impl ? &dst_impl->IDirectDrawSurface4_iface : NULL, flags); @@ -437,7 +437,7 @@ static HRESULT WINAPI ddrawex_surface4_GetBltStatus(IDirectDrawSurface4 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return IDirectDrawSurface4_GetBltStatus(surface->parent, flags); } @@ -446,7 +446,7 @@ static HRESULT WINAPI ddrawex_surface3_GetBltStatus(IDirectDrawSurface3 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return ddrawex_surface4_GetBltStatus(&surface->IDirectDrawSurface4_iface, flags); } @@ -497,7 +497,7 @@ static HRESULT WINAPI ddrawex_surface4_GetColorKey(IDirectDrawSurface4 *iface, D { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key); + TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
return IDirectDrawSurface4_GetColorKey(surface->parent, flags, color_key); } @@ -506,7 +506,7 @@ static HRESULT WINAPI ddrawex_surface3_GetColorKey(IDirectDrawSurface3 *iface, D { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key); + TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
return ddrawex_surface4_GetColorKey(&surface->IDirectDrawSurface4_iface, flags, color_key); } @@ -540,7 +540,7 @@ static HRESULT WINAPI ddrawex_surface4_GetFlipStatus(IDirectDrawSurface4 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return IDirectDrawSurface4_GetFlipStatus(surface->parent, flags); } @@ -549,7 +549,7 @@ static HRESULT WINAPI ddrawex_surface3_GetFlipStatus(IDirectDrawSurface3 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return ddrawex_surface4_GetFlipStatus(&surface->IDirectDrawSurface4_iface, flags); } @@ -697,7 +697,7 @@ static HRESULT WINAPI ddrawex_surface4_Lock(IDirectDrawSurface4 *iface, RECT *re struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); HRESULT hr;
- TRACE("iface %p, rect %s, desc %p, flags %#x, h %p.\n", + TRACE("iface %p, rect %s, desc %p, flags %#lx, h %p.\n", iface, wine_dbgstr_rect(rect), desc, flags, h);
if (SUCCEEDED(hr = IDirectDrawSurface4_Lock(surface->parent, rect, desc, flags, h)) @@ -717,7 +717,7 @@ static HRESULT WINAPI ddrawex_surface3_Lock(IDirectDrawSurface3 *iface, RECT *re DDSURFACEDESC2 ddsd2; HRESULT hr;
- TRACE("iface %p, rect %s, desc %p, flags %#x, h %p.\n", + TRACE("iface %p, rect %s, desc %p, flags %#lx, h %p.\n", iface, wine_dbgstr_rect(rect), desc, flags, h);
memset(&ddsd2, 0, sizeof(ddsd2)); @@ -793,7 +793,7 @@ static HRESULT WINAPI ddrawex_surface4_SetColorKey(IDirectDrawSurface4 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key); + TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
return IDirectDrawSurface4_SetColorKey(surface->parent, flags, color_key); } @@ -803,7 +803,7 @@ static HRESULT WINAPI ddrawex_surface3_SetColorKey(IDirectDrawSurface3 *iface, { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x, color_key %p.\n", iface, flags, color_key); + TRACE("iface %p, flags %#lx, color_key %p.\n", iface, flags, color_key);
return ddrawex_surface4_SetColorKey(&surface->IDirectDrawSurface4_iface, flags, color_key); } @@ -812,7 +812,7 @@ static HRESULT WINAPI ddrawex_surface4_SetOverlayPosition(IDirectDrawSurface4 *i { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, x %d, y %d.\n", iface, x, y); + TRACE("iface %p, x %ld, y %ld.\n", iface, x, y);
return IDirectDrawSurface4_SetOverlayPosition(surface->parent, x, y); } @@ -821,7 +821,7 @@ static HRESULT WINAPI ddrawex_surface3_SetOverlayPosition(IDirectDrawSurface3 *i { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, x %d, y %d.\n", iface, x, y); + TRACE("iface %p, x %ld, y %ld.\n", iface, x, y);
return ddrawex_surface4_SetOverlayPosition(&surface->IDirectDrawSurface4_iface, x, y); } @@ -868,7 +868,7 @@ static HRESULT WINAPI ddrawex_surface4_UpdateOverlay(IDirectDrawSurface4 *iface, struct ddrawex_surface *src_impl = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface4(dst_surface);
- TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n", + TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#lx, fx %p.\n", iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
return IDirectDrawSurface4_UpdateOverlay(src_impl->parent, src_rect, @@ -881,7 +881,7 @@ static HRESULT WINAPI ddrawex_surface3_UpdateOverlay(IDirectDrawSurface3 *iface, struct ddrawex_surface *src_impl = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *dst_impl = unsafe_impl_from_IDirectDrawSurface3(dst_surface);
- TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#x, fx %p.\n", + TRACE("iface %p, src_rect %s, dst_surface %p, dst_rect %s, flags %#lx, fx %p.\n", iface, wine_dbgstr_rect(src_rect), dst_surface, wine_dbgstr_rect(dst_rect), flags, fx);
return ddrawex_surface4_UpdateOverlay(&src_impl->IDirectDrawSurface4_iface, src_rect, @@ -892,7 +892,7 @@ static HRESULT WINAPI ddrawex_surface4_UpdateOverlayDisplay(IDirectDrawSurface4 { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return IDirectDrawSurface4_UpdateOverlayDisplay(surface->parent, flags); } @@ -901,7 +901,7 @@ static HRESULT WINAPI ddrawex_surface3_UpdateOverlayDisplay(IDirectDrawSurface3 { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return ddrawex_surface4_UpdateOverlayDisplay(&surface->IDirectDrawSurface4_iface, flags); } @@ -912,7 +912,7 @@ static HRESULT WINAPI ddrawex_surface4_UpdateOverlayZOrder(IDirectDrawSurface4 * struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface); struct ddrawex_surface *reference_impl = unsafe_impl_from_IDirectDrawSurface4(reference);
- TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference); + TRACE("iface %p, flags %#lx, reference %p.\n", iface, flags, reference);
return IDirectDrawSurface4_UpdateOverlayZOrder(surface->parent, flags, reference_impl ? reference_impl->parent : NULL); @@ -924,7 +924,7 @@ static HRESULT WINAPI ddrawex_surface3_UpdateOverlayZOrder(IDirectDrawSurface3 * struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface); struct ddrawex_surface *reference_impl = unsafe_impl_from_IDirectDrawSurface3(reference);
- TRACE("iface %p, flags %#x, reference %p.\n", iface, flags, reference); + TRACE("iface %p, flags %#lx, reference %p.\n", iface, flags, reference);
return ddrawex_surface4_UpdateOverlayZOrder(&surface->IDirectDrawSurface4_iface, flags, reference_impl ? &reference_impl->IDirectDrawSurface4_iface : NULL); @@ -957,7 +957,7 @@ static HRESULT WINAPI ddrawex_surface4_PageLock(IDirectDrawSurface4 *iface, DWOR { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return IDirectDrawSurface4_PageLock(surface->parent, flags); } @@ -966,7 +966,7 @@ static HRESULT WINAPI ddrawex_surface3_PageLock(IDirectDrawSurface3 *iface, DWOR { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return ddrawex_surface4_PageLock(&surface->IDirectDrawSurface4_iface, flags); } @@ -975,7 +975,7 @@ static HRESULT WINAPI ddrawex_surface4_PageUnlock(IDirectDrawSurface4 *iface, DW { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return IDirectDrawSurface4_PageUnlock(surface->parent, flags); } @@ -984,7 +984,7 @@ static HRESULT WINAPI ddrawex_surface3_PageUnlock(IDirectDrawSurface3 *iface, DW { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface);
- TRACE("iface %p, flags %#x.\n", iface, flags); + TRACE("iface %p, flags %#lx.\n", iface, flags);
return ddrawex_surface4_PageUnlock(&surface->IDirectDrawSurface4_iface, flags); } @@ -994,7 +994,7 @@ static HRESULT WINAPI ddrawex_surface4_SetSurfaceDesc(IDirectDrawSurface4 *iface { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, desc %p, flags %#x.\n", iface, desc, flags); + TRACE("iface %p, desc %p, flags %#lx.\n", iface, desc, flags);
return IDirectDrawSurface4_SetSurfaceDesc(surface->parent, desc, flags); } @@ -1005,7 +1005,7 @@ static HRESULT WINAPI ddrawex_surface3_SetSurfaceDesc(IDirectDrawSurface3 *iface struct ddrawex_surface *surface = impl_from_IDirectDrawSurface3(iface); DDSURFACEDESC2 ddsd;
- TRACE("iface %p, desc %p, flags %#x.\n", iface, desc, flags); + TRACE("iface %p, desc %p, flags %#lx.\n", iface, desc, flags);
DDSD_to_DDSD2(desc, &ddsd); return ddrawex_surface4_SetSurfaceDesc(&surface->IDirectDrawSurface4_iface, &ddsd, flags); @@ -1016,7 +1016,7 @@ static HRESULT WINAPI ddrawex_surface4_SetPrivateData(IDirectDrawSurface4 *iface { struct ddrawex_surface *surface = impl_from_IDirectDrawSurface4(iface);
- TRACE("iface %p, tag %s, data %p, data_size %u, flags %#x.\n", + TRACE("iface %p, tag %s, data %p, data_size %lu, flags %#lx.\n", iface, debugstr_guid(tag), data, data_size, flags);
/* To completely avoid this we'd have to clone the private data API in
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/ddrawex/tests/Makefile.in | 1 - dlls/ddrawex/tests/ddrawex.c | 21 ++++--- dlls/ddrawex/tests/surface.c | 106 ++++++++++++++++----------------- 3 files changed, 63 insertions(+), 65 deletions(-)
diff --git a/dlls/ddrawex/tests/Makefile.in b/dlls/ddrawex/tests/Makefile.in index 7c05ef9464c..ecb57137763 100644 --- a/dlls/ddrawex/tests/Makefile.in +++ b/dlls/ddrawex/tests/Makefile.in @@ -1,4 +1,3 @@ -EXTRADEFS = -DWINE_NO_LONG_TYPES TESTDLL = ddrawex.dll IMPORTS = user32 gdi32
diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c index 60d84fe991b..1cff73776fd 100644 --- a/dlls/ddrawex/tests/ddrawex.c +++ b/dlls/ddrawex/tests/ddrawex.c @@ -32,9 +32,8 @@ static IDirectDraw *createDDraw(void) HRESULT hr; IDirectDraw *dd;
- hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, - 0, &dd); - ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08x\n", hr); + hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, 0, &dd); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); return SUCCEEDED(hr) ? dd : NULL; }
@@ -54,7 +53,7 @@ static void RefCountTest(void) ULONG ref;
ref = get_ref((IUnknown *) dd1); - ok(ref == 1, "A new ddraw object's refcount is %u, expected 1\n", ref); + ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_AddRef(dd1); ref = get_ref((IUnknown *) dd1); @@ -64,18 +63,18 @@ static void RefCountTest(void) IDirectDraw_Release(dd1); return; } - ok(ref == 2, "After AddRef the refcount is %u, expected 2\n", ref); + ok(ref == 2, "Unexpected refcount %lu.\n", ref); IDirectDraw_Release(dd1); ref = get_ref((IUnknown *) dd1); - ok(ref == 1, "After Release the refcount is %u, expected 1\n", ref); + ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2); ref = get_ref((IUnknown *) dd2); - ok(ref == 2, "IDirectDraw2 refcount is %u, expected 2\n", ref); + ok(ref == 2, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3); ref = get_ref((IUnknown *) dd3); - ok(ref == 3, "IDirectDraw3 refcount is %u, expected 3\n", ref); + ok(ref == 3, "Unexpected refcount %lu.\n", ref);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4); if (FAILED(hr)) @@ -87,14 +86,14 @@ static void RefCountTest(void) return; } ref = get_ref((IUnknown *) dd4); - ok(ref == 4, "IDirectDraw4 refcount is %u, expected 4\n", ref); + ok(ref == 4, "Unexpected refcount %lu.\n", ref);
IDirectDraw_Release(dd1); IDirectDraw2_Release(dd2); IDirectDraw3_Release(dd3);
ref = get_ref((IUnknown *) dd4); - ok(ref == 1, "IDirectDraw4 refcount is %u, expected 1\n", ref); + ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw4_Release(dd4); } @@ -128,6 +127,6 @@ START_TEST(ddrawex) } if(classfactory) { ref = IClassFactory_Release(classfactory); - todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref); + todo_wine ok(ref == 1, "Unexpected refcount %lu.\n", ref); } } diff --git a/dlls/ddrawex/tests/surface.c b/dlls/ddrawex/tests/surface.c index 3081cfe2514..2f67c243d98 100644 --- a/dlls/ddrawex/tests/surface.c +++ b/dlls/ddrawex/tests/surface.c @@ -34,9 +34,8 @@ static IDirectDraw *createDDraw(void) HRESULT hr; IDirectDraw *dd;
- hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, - 0, &dd); - ok(hr == DD_OK, "Failed to create an IDirectDraw interface, hr = 0x%08x\n", hr); + hr = IDirectDrawFactory_CreateDirectDraw(factory, NULL, NULL, DDSCL_NORMAL, 0, 0, &dd); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); return SUCCEEDED(hr) ? dd : NULL; }
@@ -52,19 +51,19 @@ static void dctest_surf(IDirectDrawSurface *surf, int ddsdver) { ddsd2.dwSize = sizeof(ddsd2);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DDERR_DCALREADYCREATED, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DDERR_DCALREADYCREATED, "Unexpected hr %#lx.\n", hr); ok(dc2 == (HDC) 0x1234, "The failed GetDC call changed the dc: %p\n", dc2);
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08x, expected DDERR_SURFACEBUSY\n", hr); + ok(hr == DDERR_SURFACEBUSY, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DDERR_NODC, "IDirectDrawSurface_ReleaseDC returned 0x%08x, expected DDERR_NODC\n", hr); + ok(hr == DDERR_NODC, "Unexpected hr %#lx.\n", hr); }
static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*testfunc)(IDirectDrawSurface *surf, int ddsdver)) @@ -84,19 +83,19 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te win_skip("Unsupported mode\n"); return; } - ok(hr == DD_OK, "IDirectDraw_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc(surf, 1); IDirectDrawSurface_Release(surf);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw2_CreateSurface(dd2, ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw2_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc(surf, 1);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawSurface2, (void **) &surf2); - ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc((IDirectDrawSurface *) surf2, 1);
IDirectDrawSurface2_Release(surf2); @@ -104,14 +103,14 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te IDirectDraw2_Release(dd2);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw3_CreateSurface(dd3, ddsd, &surf, NULL); - ok(hr == DD_OK, "IDirectDraw3_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc(surf, 1);
hr = IDirectDrawSurface_QueryInterface(surf, &IID_IDirectDrawSurface3, (void **) &surf3); - ok(hr == DD_OK, "IDirectDrawSurface_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc((IDirectDrawSurface *) surf3, 1);
IDirectDrawSurface3_Release(surf3); @@ -119,11 +118,11 @@ static void GetDCTest_main(DDSURFACEDESC *ddsd, DDSURFACEDESC2 *ddsd2, void (*te IDirectDraw3_Release(dd3);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4); - ok(hr == DD_OK, "IDirectDraw_QueryInterface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
surf = NULL; hr = IDirectDraw4_CreateSurface(dd4, ddsd2, &surf4, NULL); - ok(hr == DD_OK, "IDirectDraw4_CreateSurface failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); testfunc((IDirectDrawSurface *) surf4, 2);
IDirectDrawSurface4_Release(surf4); @@ -171,13 +170,14 @@ static void CapsTest(void) win_skip("Unsupported mode\n"); return; } - ok(hr == DD_OK, "Creating a SYSMEM | VIDMEM surface returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); if(surf) IDirectDrawSurface_Release(surf);
IDirectDraw_Release(dd1); }
-static void dctest_sysvidmem(IDirectDrawSurface *surf, int ddsdver) { +static void dctest_sysvidmem(IDirectDrawSurface *surf, int ddsdver) +{ HRESULT hr; HDC dc, dc2 = (HDC) 0x1234; DDSURFACEDESC ddsd; @@ -189,30 +189,30 @@ static void dctest_sysvidmem(IDirectDrawSurface *surf, int ddsdver) { ddsd2.dwSize = sizeof(ddsd2);
hr = IDirectDrawSurface_GetDC(surf, &dc); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_GetDC(surf, &dc2); - ok(hr == DD_OK, "IDirectDrawSurface_GetDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); ok(dc == dc2, "Got two different DCs\n");
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Lock returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Lock(surf, NULL, ddsdver == 1 ? &ddsd : ((DDSURFACEDESC *) &ddsd2), 0, NULL); - ok(hr == DDERR_SURFACEBUSY, "IDirectDrawSurface_Lock returned 0x%08x, expected DDERR_SURFACEBUSY\n", hr); + ok(hr == DDERR_SURFACEBUSY, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_Unlock(surf, NULL); - ok(hr == DD_OK, "IDirectDrawSurface_Unlock returned 0x%08x, expected DD_OK\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_Unlock(surf, NULL); - ok(hr == DDERR_NOTLOCKED, "IDirectDrawSurface_Unlock returned 0x%08x, expected DDERR_NOTLOCKED\n", hr); + ok(hr == DDERR_NOTLOCKED, "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); /* That works any number of times... */ hr = IDirectDrawSurface_ReleaseDC(surf, dc); - ok(hr == DD_OK, "IDirectDrawSurface_ReleaseDC failed: 0x%08x\n", hr); + ok(hr == DD_OK, "Unexpected hr %#lx.\n", hr); }
static void SysVidMemTest(void) @@ -249,7 +249,7 @@ static void test_surface_from_dc3(void)
dd1 = createDDraw(); hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **)&dd3); - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); IDirectDraw_Release(dd1);
memset(&ddsd, 0, sizeof(ddsd)); @@ -265,33 +265,33 @@ static void test_surface_from_dc3(void) IDirectDraw3_Release(dd3); return; } - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface3_QueryInterface(surf1, &IID_IDirectDrawSurface, (void **)&surf3); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); IDirectDrawSurface_Release(surf1);
hr = IDirectDrawSurface3_GetDC(surf3, &dc); - ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, NULL); - ok(hr == E_POINTER, "Expected E_POINTER, got %#x.\n", hr); + ok(hr == E_POINTER, "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, &tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok((IDirectDrawSurface3 *)tmp == surf3, "Expected surface != %p.\n", surf3);
IUnknown_Release(tmp);
hr = IDirectDrawSurface3_ReleaseDC(surf3, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
dc = CreateCompatibleDC(NULL); ok(!!dc, "CreateCompatibleDC failed.\n");
tmp = (IDirectDrawSurface *)0xdeadbeef; hr = IDirectDraw3_GetSurfaceFromDC(dd3, dc, &tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Unexpected hr %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n"); @@ -321,7 +321,7 @@ static void test_surface_from_dc4(void) IDirectDraw_Release(dd1); return; } - ok(SUCCEEDED(hr), "IDirectDraw_QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); IDirectDraw_Release(dd1);
memset(&ddsd2, 0, sizeof(ddsd2)); @@ -337,65 +337,65 @@ static void test_surface_from_dc4(void) IDirectDraw3_Release(dd4); return; } - ok(SUCCEEDED(hr), "CreateSurface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
hr = IDirectDrawSurface4_QueryInterface(surf4, &IID_IDirectDrawSurface, (void **)&surf1); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
priv = 0xdeadbeef; size = sizeof(priv); hr = IDirectDrawSurface4_SetPrivateData(surf4, &guid, &priv, size, 0); - ok(SUCCEEDED(hr), "SetPrivateData failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
priv = 0; hr = IDirectDrawSurface4_GetPrivateData(surf4, &guid, &priv, &size); - ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#x.\n", hr); - ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#x.\n", priv); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); + ok(priv == 0xdeadbeef, "Unexpected private data %#lx.\n", priv);
hr = IDirectDrawSurface4_GetDC(surf4, &dc); - ok(SUCCEEDED(hr), "GetDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, NULL); - ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %#x.\n", hr); + ok(hr == E_INVALIDARG, "Unexpected hr %#lx.\n", hr);
hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); - ok(SUCCEEDED(hr), "GetSurfaceFromDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok((IDirectDrawSurface4 *)tmp != surf4, "Expected surface != %p.\n", surf4);
hr = IUnknown_QueryInterface(tmp, &IID_IDirectDrawSurface, (void **)&tmp2); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok(tmp2 == tmp, "Expected %p, got %p.\n", tmp, tmp2); ok((IDirectDrawSurface *)tmp2 != surf1, "Expected surface != %p.\n", surf1); IUnknown_Release(tmp2);
hr = IUnknown_QueryInterface(tmp, &IID_IDirectDrawSurface4, (void **)&tmp2); - ok(SUCCEEDED(hr), "QueryInterface failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); ok((IDirectDrawSurface4 *)tmp2 != surf4, "Expected surface != %p.\n", surf4);
priv = 0; hr = IDirectDrawSurface4_GetPrivateData((IDirectDrawSurface4 *)tmp2, &guid, &priv, &size); - ok(SUCCEEDED(hr), "GetPrivateData failed, hr %#x.\n", hr); - ok(priv == 0xdeadbeef, "Expected private data 0xdeadbeef, got %#x.\n", priv); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr); + ok(priv == 0xdeadbeef, "Unexpected private data %#lx.\n", priv); IUnknown_Release(tmp2);
IUnknown_Release(tmp);
hr = IDirectDrawSurface4_ReleaseDC(surf4, dc); - ok(SUCCEEDED(hr), "ReleaseDC failed, hr %#x.\n", hr); + ok(SUCCEEDED(hr), "Unexpected hr %#lx.\n", hr);
dc = CreateCompatibleDC(NULL); ok(!!dc, "CreateCompatibleDC failed.\n");
tmp = (IUnknown *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(dd4, dc, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Unexpected hr %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
ok(DeleteDC(dc), "DeleteDC failed.\n");
tmp = (IUnknown *)0xdeadbeef; hr = IDirectDraw4_GetSurfaceFromDC(dd4, NULL, (IDirectDrawSurface4 **)&tmp); - ok(hr == DDERR_NOTFOUND, "Expected DDERR_NOTFOUND, got %#x.\n", hr); + ok(hr == DDERR_NOTFOUND, "Unexpected hr %#lx.\n", hr); ok(!tmp, "Expected surface NULL, got %p.\n", tmp);
IDirectDrawSurface_Release(surf1); @@ -442,5 +442,5 @@ START_TEST(surface) ref = IDirectDrawFactory_Release(factory); ok(ref == 0, "IDirectDrawFactory not cleanly released\n"); ref = IClassFactory_Release(classfactory); - todo_wine ok(ref == 1, "IClassFactory refcount wrong, ref = %u\n", ref); + todo_wine ok(ref == 1, "Unexpected refcount %lu.\n", ref); }
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/ddrawex/tests/ddrawex.c | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/dlls/ddrawex/tests/ddrawex.c b/dlls/ddrawex/tests/ddrawex.c index 1cff73776fd..59268444ea2 100644 --- a/dlls/ddrawex/tests/ddrawex.c +++ b/dlls/ddrawex/tests/ddrawex.c @@ -37,10 +37,11 @@ static IDirectDraw *createDDraw(void) return SUCCEEDED(hr) ? dd : NULL; }
-static ULONG get_ref(IUnknown *o) +static ULONG get_refcount(void *iface) { - IUnknown_AddRef(o); - return IUnknown_Release(o); + IUnknown *unknown = iface; + IUnknown_AddRef(unknown); + return IUnknown_Release(unknown); }
static void RefCountTest(void) @@ -52,11 +53,11 @@ static void RefCountTest(void) HRESULT hr; ULONG ref;
- ref = get_ref((IUnknown *) dd1); + ref = get_refcount(dd1); ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_AddRef(dd1); - ref = get_ref((IUnknown *) dd1); + ref = get_refcount(dd1); if (ref == 1) { win_skip("Refcounting is broken\n"); @@ -65,15 +66,15 @@ static void RefCountTest(void) } ok(ref == 2, "Unexpected refcount %lu.\n", ref); IDirectDraw_Release(dd1); - ref = get_ref((IUnknown *) dd1); + ref = get_refcount(dd1); ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw2, (void **) &dd2); - ref = get_ref((IUnknown *) dd2); + ref = get_refcount(dd2); ok(ref == 2, "Unexpected refcount %lu.\n", ref);
IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw3, (void **) &dd3); - ref = get_ref((IUnknown *) dd3); + ref = get_refcount(dd3); ok(ref == 3, "Unexpected refcount %lu.\n", ref);
hr = IDirectDraw_QueryInterface(dd1, &IID_IDirectDraw4, (void **) &dd4); @@ -85,14 +86,14 @@ static void RefCountTest(void) IDirectDraw3_Release(dd3); return; } - ref = get_ref((IUnknown *) dd4); + ref = get_refcount(dd4); ok(ref == 4, "Unexpected refcount %lu.\n", ref);
IDirectDraw_Release(dd1); IDirectDraw2_Release(dd2); IDirectDraw3_Release(dd3);
- ref = get_ref((IUnknown *) dd4); + ref = get_refcount(dd4); ok(ref == 1, "Unexpected refcount %lu.\n", ref);
IDirectDraw4_Release(dd4);
Signed-off-by: Henri Verbeet hverbeet@codeweavers.com