Alexandre Julliard : ddraw/tests: Fix a few tests that fail on Win64.
Alexandre Julliard
julliard at winehq.org
Mon Jul 13 07:54:49 CDT 2009
Module: wine
Branch: master
Commit: 5622f74486eb560f38867655f9f754c0c5b21cb9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=5622f74486eb560f38867655f9f754c0c5b21cb9
Author: Alexandre Julliard <julliard at winehq.org>
Date: Fri Jul 10 20:52:33 2009 +0200
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 57e1da0..f4cd07b 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 c3280fb..a73c34c 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 d1edc1d..55c4989 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 bfff64a..f0496e3 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);
More information about the wine-cvs
mailing list