From 5622f74486eb560f38867655f9f754c0c5b21cb9 Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Fri, 10 Jul 2009 20:52:33 +0200 Subject: [PATCH] ddraw/tests: Fix a few tests that fail on Win64. --- dlls/ddraw/tests/d3d.c | 1 + dlls/ddraw/tests/dsurface.c | 3 ++- dlls/ddraw/tests/overlay.c | 3 ++- dlls/ddraw/tests/refcount.c | 12 +++++++++++- 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 57e1da002d..f4cd07b3fa 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c @@ -951,6 +951,7 @@ static BOOL D3D1_createObjects(void) ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr); hr = IDirectDraw_QueryInterface(DirectDraw1, &IID_IDirect3D, (void**) &Direct3D1); + if (hr == E_NOINTERFACE) return FALSE; ok(hr==DD_OK, "QueryInterface returned: %x\n", hr); if (!Direct3D1) { return FALSE; diff --git a/dlls/ddraw/tests/dsurface.c b/dlls/ddraw/tests/dsurface.c index c3280fb588..a73c34c381 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c @@ -1029,7 +1029,8 @@ static void IFaceRefCount(void) todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); /* IDirect3DTexture interface (unlike the others) alters the original IDirectDrawSurface ref count */ - IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DTexture, (void **) &tex); + ret = IDirectDrawSurface_QueryInterface(surf, &IID_IDirect3DTexture, (void **) &tex); + if (ret == E_NOINTERFACE) return; /* win64 */ ref = getRefcount((IUnknown *) tex); todo_wine ok(ref == 2, "Refcount is %u, expected 2\n", ref); ref = getRefcount((IUnknown *) surf); diff --git a/dlls/ddraw/tests/overlay.c b/dlls/ddraw/tests/overlay.c index d1edc1d8d2..55c4989b9b 100644 --- a/dlls/ddraw/tests/overlay.c +++ b/dlls/ddraw/tests/overlay.c @@ -200,7 +200,8 @@ static void yv12_test(void) ok(desc.dwFlags == (DDSD_WIDTH | DDSD_HEIGHT | DDSD_PIXELFORMAT | DDSD_CAPS | DDSD_PITCH), "Unexpected desc.dwFlags 0x%08x\n", desc.dwFlags); - ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM), + ok(desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM) || + desc.ddsCaps.dwCaps == (DDSCAPS_OVERLAY | DDSCAPS_VIDEOMEMORY | DDSCAPS_LOCALVIDMEM | DDSCAPS_HWCODEC), "Unexpected desc.ddsCaps.dwCaps 0x%08x\n", desc.ddsCaps.dwCaps); ok(desc.dwWidth == 256 && desc.dwHeight == 256, "Expected size 64x64, got %ux%u\n", desc.dwWidth, desc.dwHeight); diff --git a/dlls/ddraw/tests/refcount.c b/dlls/ddraw/tests/refcount.c index bfff64afbd..f0496e3f73 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c @@ -237,7 +237,17 @@ static void test_iface_refcnt(void) ok(ref == 1, "IDirectDraw reference count is %ld\n", ref); hr = IDirectDraw7_QueryInterface(DDraw7, &IID_IDirect3D7, (void **) &D3D7); - ok(hr == DD_OK, "IDirectDraw7_QueryInterface returned %08x\n", hr); + ok(hr == DD_OK || hr == E_NOINTERFACE, /* win64 */ + "IDirectDraw7_QueryInterface returned %08x\n", hr); + if (FAILED(hr)) + { + IDirectDraw7_Release(DDraw7); + IDirectDraw4_Release(DDraw4); + IDirectDraw2_Release(DDraw2); + IDirectDraw_Release(DDraw1); + skip( "no IDirect3D7 support\n" ); + return; + } /* Apparently IDirectDrawX and IDirect3DX are linked together */ ref = getRefcount( (IUnknown *) D3D7); -- 2.32.0.93.g670b81a890