ddraw/tests: Fix a few tests that fail on Win64.
diff --git a/dlls/ddraw/tests/d3d.c b/dlls/ddraw/tests/d3d.c index 57e1da0..f4cd07b 100644 --- a/dlls/ddraw/tests/d3d.c +++ b/dlls/ddraw/tests/d3d.c
@@ -951,6 +951,7 @@ 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 c3280fb..a73c34c 100644 --- a/dlls/ddraw/tests/dsurface.c +++ b/dlls/ddraw/tests/dsurface.c
@@ -1029,7 +1029,8 @@ 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 d1edc1d..55c4989 100644 --- a/dlls/ddraw/tests/overlay.c +++ b/dlls/ddraw/tests/overlay.c
@@ -200,7 +200,8 @@ 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 bfff64a..f0496e3 100644 --- a/dlls/ddraw/tests/refcount.c +++ b/dlls/ddraw/tests/refcount.c
@@ -237,7 +237,17 @@ 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);