[PATCH 2/5] d3dx9/tests: Use explicit A calls.
Henri Verbeet
hverbeet at codeweavers.com
Thu Oct 31 03:40:40 CDT 2013
---
dlls/d3dx9_36/tests/Makefile.in | 1 -
dlls/d3dx9_36/tests/core.c | 10 ++---
dlls/d3dx9_36/tests/effect.c | 8 ++--
dlls/d3dx9_36/tests/line.c | 8 ++--
dlls/d3dx9_36/tests/mesh.c | 88 +++++++++++++++++----------------------
dlls/d3dx9_36/tests/shader.c | 18 +++-----
dlls/d3dx9_36/tests/surface.c | 16 ++++---
dlls/d3dx9_36/tests/texture.c | 4 +-
dlls/d3dx9_36/tests/volume.c | 3 +-
9 files changed, 70 insertions(+), 86 deletions(-)
diff --git a/dlls/d3dx9_36/tests/Makefile.in b/dlls/d3dx9_36/tests/Makefile.in
index a99bb63..c99045c 100644
--- a/dlls/d3dx9_36/tests/Makefile.in
+++ b/dlls/d3dx9_36/tests/Makefile.in
@@ -1,6 +1,5 @@
TESTDLL = d3dx9_36.dll
IMPORTS = d3dx9 d3d9 user32 gdi32
-EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
C_SRCS = \
asm.c \
diff --git a/dlls/d3dx9_36/tests/core.c b/dlls/d3dx9_36/tests/core.c
index e25a5d3..d2e2d5e 100644
--- a/dlls/d3dx9_36/tests/core.c
+++ b/dlls/d3dx9_36/tests/core.c
@@ -305,7 +305,7 @@ static void test_ID3DXSprite(IDirect3DDevice9 *device)
static void test_ID3DXFont(IDirect3DDevice9 *device)
{
- D3DXFONT_DESC desc;
+ D3DXFONT_DESCA desc;
ID3DXFont *font;
HRESULT hr;
int ref;
@@ -1225,13 +1225,13 @@ START_TEST(core)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd) {
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ {
skip("Couldn't create application window\n");
return;
}
- if (!d3d) {
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
+ {
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
return;
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c
index fb3647a..54ae9f8 100644
--- a/dlls/d3dx9_36/tests/effect.c
+++ b/dlls/d3dx9_36/tests/effect.c
@@ -2691,13 +2691,13 @@ START_TEST(effect)
HRESULT hr;
ULONG count;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd) {
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ {
skip("Couldn't create application window\n");
return;
}
- if (!d3d) {
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
+ {
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
return;
diff --git a/dlls/d3dx9_36/tests/line.c b/dlls/d3dx9_36/tests/line.c
index 89e4fc6..25d1f32 100644
--- a/dlls/d3dx9_36/tests/line.c
+++ b/dlls/d3dx9_36/tests/line.c
@@ -123,13 +123,13 @@ START_TEST(line)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd) {
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
+ {
skip("Couldn't create application window\n");
return;
}
- if (!d3d) {
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
+ {
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
return;
diff --git a/dlls/d3dx9_36/tests/mesh.c b/dlls/d3dx9_36/tests/mesh.c
index 46d8b24..4878256 100644
--- a/dlls/d3dx9_36/tests/mesh.c
+++ b/dlls/d3dx9_36/tests/mesh.c
@@ -111,8 +111,7 @@ static struct test_context *new_test_context(void)
D3DPRESENT_PARAMETERS d3dpp = {0};
struct test_context *test_context;
- hwnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!hwnd)
+ if (!(hwnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
goto error;
@@ -1166,8 +1165,7 @@ 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);
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -1373,8 +1371,7 @@ 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);
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -2248,8 +2245,7 @@ static void D3DXLoadMeshTest(void)
D3DXFRAME *frame_hier = NULL;
D3DXMATRIX transform;
- wnd = CreateWindow("static", "d3dx9_test", WS_POPUP, 0, 0, 1000, 1000, NULL, NULL, NULL, NULL);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_POPUP, 0, 0, 1000, 1000, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
@@ -2419,7 +2415,7 @@ static void D3DXCreateBoxTest(void)
{
HRESULT hr;
HWND wnd;
- WNDCLASS wc={0};
+ WNDCLASSA wc = {0};
IDirect3D9* d3d;
IDirect3DDevice9* device;
D3DPRESENT_PARAMETERS d3dpp;
@@ -2437,14 +2433,14 @@ static void D3DXCreateBoxTest(void)
wc.lpfnWndProc = DefWindowProcA;
wc.lpszClassName = "d3dx9_test_wc";
- if (!RegisterClass(&wc))
+ if (!RegisterClassA(&wc))
{
skip("RegisterClass failed\n");
return;
}
- wnd = CreateWindow("d3dx9_test_wc", "d3dx9_test",
- WS_SYSMENU | WS_POPUP , 0, 0, 640, 480, 0, 0, 0, 0);
+ wnd = CreateWindowA("d3dx9_test_wc", "d3dx9_test", WS_SYSMENU | WS_POPUP,
+ 0, 0, 640, 480, 0, 0, 0, 0);
ok(wnd != NULL, "Expected to have a window, received NULL\n");
if (!wnd)
{
@@ -2744,14 +2740,12 @@ 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);
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
@@ -2988,14 +2982,12 @@ 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);
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
@@ -3433,7 +3425,7 @@ static BOOL compute_text_mesh(struct mesh *mesh, HDC hdc, const char *text,
glyphs[i].offset_x = offset_x;
- datasize = GetGlyphOutline(hdc, text[i], GGO_NATIVE, &gm, 0, NULL, &identity);
+ datasize = GetGlyphOutlineA(hdc, text[i], GGO_NATIVE, &gm, 0, NULL, &identity);
if (datasize < 0) {
hr = E_FAIL;
goto error;
@@ -3444,7 +3436,7 @@ static BOOL compute_text_mesh(struct mesh *mesh, HDC hdc, const char *text,
hr = E_OUTOFMEMORY;
goto error;
}
- datasize = GetGlyphOutline(hdc, text[i], GGO_NATIVE, &gm, datasize, raw_outline, &identity);
+ datasize = GetGlyphOutlineA(hdc, text[i], GGO_NATIVE, &gm, datasize, raw_outline, &identity);
create_outline(&glyphs[i], raw_outline, datasize, deviation, otmEMSquare);
@@ -3909,16 +3901,16 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text,
ID3DXMesh *d3dxmesh;
struct mesh mesh;
char name[256];
- OUTLINETEXTMETRIC otm;
+ OUTLINETEXTMETRICA otm;
GLYPHMETRICS gm;
GLYPHMETRICSFLOAT *glyphmetrics_float = HeapAlloc(GetProcessHeap(), 0, sizeof(GLYPHMETRICSFLOAT) * strlen(text));
int i;
- LOGFONT lf;
+ LOGFONTA lf;
HFONT font = NULL, oldfont = NULL;
sprintf(name, "text ('%s', %f, %f)", text, deviation, extrusion);
- hr = D3DXCreateText(device, hdc, text, deviation, extrusion, &d3dxmesh, NULL, glyphmetrics_float);
+ hr = D3DXCreateTextA(device, hdc, text, deviation, extrusion, &d3dxmesh, NULL, glyphmetrics_float);
ok(hr == D3D_OK, "Got result %x, expected 0 (D3D_OK)\n", hr);
if (hr != D3D_OK)
{
@@ -3928,8 +3920,8 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text,
/* must select a modified font having lfHeight = otm.otmEMSquare before
* calling GetGlyphOutline to get the expected values */
- if (!GetObject(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), &lf) ||
- !GetOutlineTextMetrics(hdc, sizeof(otm), &otm))
+ if (!GetObjectA(GetCurrentObject(hdc, OBJ_FONT), sizeof(lf), &lf)
+ || !GetOutlineTextMetricsA(hdc, sizeof(otm), &otm))
{
d3dxmesh->lpVtbl->Release(d3dxmesh);
skip("Couldn't get text outline\n");
@@ -3937,8 +3929,8 @@ static void test_createtext(IDirect3DDevice9 *device, HDC hdc, const char *text,
}
lf.lfHeight = otm.otmEMSquare;
lf.lfWidth = 0;
- font = CreateFontIndirect(&lf);
- if (!font) {
+ if (!(font = CreateFontIndirectA(&lf)))
+ {
d3dxmesh->lpVtbl->Release(d3dxmesh);
skip("Couldn't create the modified font\n");
return;
@@ -3985,18 +3977,16 @@ static void D3DXCreateTextTest(void)
D3DPRESENT_PARAMETERS d3dpp;
ID3DXMesh* d3dxmesh = NULL;
HFONT hFont;
- OUTLINETEXTMETRIC otm;
+ OUTLINETEXTMETRICA otm;
int number_of_vertices;
int number_of_faces;
- wnd = CreateWindow("static", "d3dx9_test", WS_POPUP, 0, 0, 1000, 1000, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", WS_POPUP, 0, 0, 1000, 1000, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
@@ -4017,13 +4007,12 @@ static void D3DXCreateTextTest(void)
hdc = CreateCompatibleDC(NULL);
- hFont = CreateFont(12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET,
- OUT_DEFAULT_PRECIS, CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE,
- "Arial");
+ hFont = CreateFontA(12, 0, 0, 0, FW_NORMAL, FALSE, FALSE, FALSE, DEFAULT_CHARSET, OUT_DEFAULT_PRECIS,
+ CLIP_DEFAULT_PRECIS, DEFAULT_QUALITY, DEFAULT_PITCH | FF_DONTCARE, "Arial");
SelectObject(hdc, hFont);
- GetOutlineTextMetrics(hdc, sizeof(otm), &otm);
+ GetOutlineTextMetricsA(hdc, sizeof(otm), &otm);
- hr = D3DXCreateText(device, hdc, "wine", 0.001f, 0.4f, NULL, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, 0.4f, NULL, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
/* D3DXCreateTextA page faults from passing NULL text */
@@ -4031,32 +4020,32 @@ static void D3DXCreateTextTest(void)
hr = D3DXCreateTextW(device, hdc, NULL, 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(device, hdc, "", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(device, hdc, " ", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, " ", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(NULL, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(NULL, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(device, NULL, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, NULL, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(device, hdc, "wine", -FLT_MIN, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", -FLT_MIN, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXCreateText(device, hdc, "wine", 0.001f, -FLT_MIN, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, -FLT_MIN, &d3dxmesh, NULL, NULL);
ok(hr == D3DERR_INVALIDCALL, "Got result %x, expected %x (D3DERR_INVALIDCALL)\n", hr, D3DERR_INVALIDCALL);
/* deviation = 0.0f treated as if deviation = 1.0f / otm.otmEMSquare */
- hr = D3DXCreateText(device, hdc, "wine", 1.0f / otm.otmEMSquare, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", 1.0f / otm.otmEMSquare, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK);
number_of_vertices = d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh);
number_of_faces = d3dxmesh->lpVtbl->GetNumFaces(d3dxmesh);
if (SUCCEEDED(hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
- hr = D3DXCreateText(device, hdc, "wine", 0.0f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", 0.0f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK);
ok(number_of_vertices == d3dxmesh->lpVtbl->GetNumVertices(d3dxmesh),
"Got %d vertices, expected %d\n",
@@ -4075,7 +4064,7 @@ static void D3DXCreateTextTest(void)
trace("D3DXCreateText finish with deviation = FLT_MIN\n");
#endif
- hr = D3DXCreateText(device, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
+ hr = D3DXCreateTextA(device, hdc, "wine", 0.001f, 0.4f, &d3dxmesh, NULL, NULL);
ok(hr == D3D_OK, "Got result %x, expected %x (D3D_OK)\n", hr, D3D_OK);
if (SUCCEEDED(hr) && d3dxmesh) d3dxmesh->lpVtbl->Release(d3dxmesh);
@@ -4283,8 +4272,7 @@ static void D3DXGenerateAdjacencyTest(void)
},
};
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, 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 c19617f..ba6a735 100644
--- a/dlls/d3dx9_36/tests/shader.c
+++ b/dlls/d3dx9_36/tests/shader.c
@@ -1424,14 +1424,12 @@ static void test_setting_constants(void)
ULONG refcnt;
/* Create the device to use for our tests */
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
@@ -6070,14 +6068,12 @@ static void test_registerset(void)
D3DCAPS9 caps;
/* Create the device to use for our tests */
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
@@ -6376,14 +6372,12 @@ static void test_registerset_defaults(void)
D3DCAPS9 caps;
/* Create the device to use for our tests */
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- d3d = Direct3DCreate9(D3D_SDK_VERSION);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
}
- if (!d3d)
+ if (!(d3d = Direct3DCreate9(D3D_SDK_VERSION)))
{
skip("Couldn't create IDirect3D9 object\n");
DestroyWindow(wnd);
diff --git a/dlls/d3dx9_36/tests/surface.c b/dlls/d3dx9_36/tests/surface.c
index 1255744..3af34d4 100644
--- a/dlls/d3dx9_36/tests/surface.c
+++ b/dlls/d3dx9_36/tests/surface.c
@@ -665,19 +665,23 @@ static void test_D3DXLoadSurface(IDirect3DDevice9 *device)
/* D3DXLoadSurfaceFromResource */
- hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCE(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL);
+ hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL,
+ MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL);
ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3D_OK);
- hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCE(IDD_BITMAPDATA_1x1), NULL, D3DX_DEFAULT, 0, NULL);
+ hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL,
+ MAKEINTRESOURCEA(IDD_BITMAPDATA_1x1), NULL, D3DX_DEFAULT, 0, NULL);
ok(hr == D3D_OK, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3D_OK);
hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, NULL, NULL, D3DX_DEFAULT, 0, NULL);
ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA);
- hr = D3DXLoadSurfaceFromResourceA(NULL, NULL, NULL, NULL, MAKEINTRESOURCE(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL);
+ hr = D3DXLoadSurfaceFromResourceA(NULL, NULL, NULL, NULL,
+ MAKEINTRESOURCEA(IDB_BITMAP_1x1), NULL, D3DX_DEFAULT, 0, NULL);
ok(hr == D3DERR_INVALIDCALL, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DERR_INVALIDCALL);
- hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL, MAKEINTRESOURCE(IDS_STRING), NULL, D3DX_DEFAULT, 0, NULL);
+ hr = D3DXLoadSurfaceFromResourceA(surf, NULL, NULL, NULL,
+ MAKEINTRESOURCEA(IDS_STRING), NULL, D3DX_DEFAULT, 0, NULL);
ok(hr == D3DXERR_INVALIDDATA, "D3DXLoadSurfaceFromResource returned %#x, expected %#x\n", hr, D3DXERR_INVALIDDATA);
@@ -1277,8 +1281,8 @@ START_TEST(surface)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd) {
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, 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 c168052..18ac720 100644
--- a/dlls/d3dx9_36/tests/texture.c
+++ b/dlls/d3dx9_36/tests/texture.c
@@ -1786,8 +1786,8 @@ START_TEST(texture)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd) {
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, 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 eb2877f..8f1dc29 100644
--- a/dlls/d3dx9_36/tests/volume.c
+++ b/dlls/d3dx9_36/tests/volume.c
@@ -267,8 +267,7 @@ START_TEST(volume)
D3DPRESENT_PARAMETERS d3dpp;
HRESULT hr;
- wnd = CreateWindow("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL);
- if (!wnd)
+ if (!(wnd = CreateWindowA("static", "d3dx9_test", 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL)))
{
skip("Couldn't create application window\n");
return;
--
1.7.10.4
More information about the wine-patches
mailing list