James Hawkins : d3d9: Fix a few test failures in win2k3.

Alexandre Julliard julliard at winehq.org
Mon Apr 28 08:00:56 CDT 2008


Module: wine
Branch: master
Commit: 7b385fb60c1333de6054c4af30bc8cadd6880a34
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7b385fb60c1333de6054c4af30bc8cadd6880a34

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Fri Apr 25 22:56:46 2008 -0500

d3d9: Fix a few test failures in win2k3.

---

 dlls/d3d9/tests/device.c |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/dlls/d3d9/tests/device.c b/dlls/d3d9/tests/device.c
index 8f4542a..5b51c40 100644
--- a/dlls/d3d9/tests/device.c
+++ b/dlls/d3d9/tests/device.c
@@ -166,7 +166,8 @@ static void test_swapchain(void)
 
     hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
                                   D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice );
-    ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
+    ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE,
+       "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
     if (FAILED(hr)) goto cleanup;
 
     /* Check if the back buffer count was modified */
@@ -347,7 +348,8 @@ static void test_refcount(void)
 
     hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
                                   D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice );
-    ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
+    ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE,
+       "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
     if (FAILED(hr)) goto cleanup;
 
     refcount = get_refcount( (IUnknown *)pDevice );
@@ -657,7 +659,8 @@ static void test_cursor(void)
 
     hr = IDirect3D9_CreateDevice( pD3d, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
                                   D3DCREATE_SOFTWARE_VERTEXPROCESSING, &d3dpp, &pDevice );
-    ok(SUCCEEDED(hr), "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
+    ok(hr == S_OK || hr == D3DERR_NOTAVAILABLE,
+       "Failed to create IDirect3D9Device (%s)\n", DXGetErrorString9(hr));
     if (FAILED(hr)) goto cleanup;
 
     IDirect3DDevice9_CreateOffscreenPlainSurface(pDevice, 32, 32, D3DFMT_A8R8G8B8, D3DPOOL_SCRATCH, &cursor, 0);
@@ -1753,7 +1756,8 @@ static void test_lights(void)
 
     hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
                                   D3DCREATE_HARDWARE_VERTEXPROCESSING | D3DCREATE_PUREDEVICE, &present_parameters, &device );
-    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr));
+    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL,
+       "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr));
     if(!device)
     {
         skip("Failed to create a d3d device\n");
@@ -1813,7 +1817,8 @@ static void test_set_stream_source(void)
 
     hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, hwnd,
                                   D3DCREATE_HARDWARE_VERTEXPROCESSING, &present_parameters, &device );
-    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE, "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr));
+    ok(hr == D3D_OK || hr == D3DERR_NOTAVAILABLE || hr == D3DERR_INVALIDCALL,
+       "IDirect3D9_CreateDevice failed with %s\n", DXGetErrorString9(hr));
     if(!device)
     {
         hr = IDirect3D9_CreateDevice( d3d9, D3DADAPTER_DEFAULT, D3DDEVTYPE_REF, hwnd,




More information about the wine-cvs mailing list