ddraw/tests: Fix a few tests that fail on Win64.

This commit is contained in:
Alexandre Julliard 2009-07-10 20:52:33 +02:00
parent 74c985aad1
commit 5622f74486
4 changed files with 16 additions and 3 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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);