[PATCH 4/5] d3dx9_36/tests: Use a window with a non-zero size.
Stefan Dösinger
stefan at codeweavers.com
Thu Jan 9 06:43:23 CST 2014
Otherwise creating a d3d9 device fails on Windows 7.
WS_SYSMENU | WS_POPUP follows the existing code in D3DXCreateBoxTest,
which is the only test that created a useable device on my system.
---
dlls/d3dx9_36/tests/core.c | 3 ++-
dlls/d3dx9_36/tests/effect.c | 3 ++-
dlls/d3dx9_36/tests/line.c | 3 ++-
dlls/d3dx9_36/tests/mesh.c | 18 ++++++++++++------
dlls/d3dx9_36/tests/shader.c | 12 ++++++------
dlls/d3dx9_36/tests/surface.c | 3 ++-
dlls/d3dx9_36/tests/texture.c | 3 ++-
dlls/d3dx9_36/tests/volume.c | 3 ++-
8 files changed, 30 insertions(+), 18 deletions(-)
diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c
index d2e2d5e..5afc92b 100644
--- a/dlls/d3dx9_36/tests/core.c
+++ b/dlls/d3dx9_36/tests/core.c
@@ -1225,7 +1225,8 @@ START_TEST(core)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index 2306f1e..15ecc8c 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -2691,7 +2691,8 @@ START_TEST(effect)
HRESULT hr;
ULONG count;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/line.c b/dlls/d3dx9_36/tests/line.c
index 25d1f32..34ddbb9 100644
--- a/dlls/d3dx9_36/tests/line.c
+++ b/dlls/d3dx9_36/tests/line.c
@@ -123,7 +123,8 @@ START_TEST(line)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 21c3b41..c86abe2 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -111,7 +111,8 @@ static struct test_context *new_test_context(void)
D3DPRESENT_PARAMETERS d3dpp = {0};
struct test_context *test_context;
- if (!(hwnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(hwnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
goto error;
@@ -1165,7 +1166,8 @@ static void D3DXCreateMeshTest(void)
hr = D3DXCreateMesh(1, 3, D3DXMESH_MANAGED, decl1, NULL, &d3dxmesh);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -1371,7 +1373,8 @@ static void D3DXCreateMeshFVFTest(void)
hr = D3DXCreateMeshFVF(1, 3, D3DXMESH_MANAGED, D3DFVF_XYZ | D3DFVF_NORMAL, NULL, &d3dxmesh);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -2740,7 +2743,8 @@ static void D3DXCreateSphereTest(void)
hr = D3DXCreateSphere(NULL, 0.0f, 0, 1, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -2982,7 +2986,8 @@ static void D3DXCreateCylinderTest(void)
hr = D3DXCreateCylinder(NULL, 1.0f, 1.0f, 1.0f, 2, 1, &cylinder, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n",hr,D3DERR_INVALIDCALL);
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -4272,7 +4277,8 @@ static void D3DXGenerateAdjacencyTest(void)
},
};
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/shader.c b/dlls/d3dx9_36/tests/shader.c
index 4fcf3d3..fc57a82 100644
--- a/dlls/d3dx9_36/tests/shader.c
+++ b/dlls/d3dx9_36/tests/shader.c
@@ -1423,8 +1423,8 @@ static void test_setting_constants(void)
HRESULT hr;
ULONG refcnt;
- /* Create the device to use for our tests */
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -6067,8 +6067,8 @@ static void test_registerset(void)
ULONG count;
D3DCAPS9 caps;
- /* Create the device to use for our tests */
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -6371,8 +6371,8 @@ static void test_registerset_defaults(void)
ULONG count;
D3DCAPS9 caps;
- /* Create the device to use for our tests */
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 3af34d4..a4a06b2 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -1281,7 +1281,8 @@ START_TEST(surface)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/texture.c b/dlls/d3dx9_36/tests/texture.c
index 18ac720..4c96264 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -1786,7 +1786,8 @@ START_TEST(texture)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
diff --git a/dlls/d3dx9_36/tests/volume.c b/dlls/d3dx9_36/tests/volume.c
index 8f1dc29..04d360c 100644
--- a/dlls/d3dx9_36/tests/volume.c
+++ b/dlls/d3dx9_36/tests/volume.c
@@ -267,7 +267,8 @@ START_TEST(volume)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_SYSMENU | WS_POPUP, 0, 0,
+ 640, 480, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
--
1.8.3.2
More information about the wine-patches
mailing list