d3d8/tests: Use explicit A calls.
This commit is contained in:
parent
f70672336e
commit
45a1aae0a1
|
@ -1,6 +1,5 @@
|
|||
TESTDLL = d3d8.dll
|
||||
IMPORTS = user32
|
||||
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
|
||||
|
||||
C_SRCS = \
|
||||
device.c \
|
||||
|
|
|
@ -69,7 +69,7 @@ static void flush_events(void)
|
|||
while (diff > 0)
|
||||
{
|
||||
if (MsgWaitForMultipleObjects( 0, NULL, FALSE, min_timeout, QS_ALLINPUT ) == WAIT_TIMEOUT) break;
|
||||
while (PeekMessage( &msg, 0, 0, 0, PM_REMOVE )) DispatchMessage( &msg );
|
||||
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
|
||||
diff = time - GetTickCount();
|
||||
}
|
||||
}
|
||||
|
@ -192,7 +192,8 @@ static void test_mipmap_levels(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -240,7 +241,8 @@ static void test_swapchain(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -387,7 +389,8 @@ static void test_refcount(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -722,7 +725,8 @@ static void test_cursor(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -846,7 +850,7 @@ static void test_cursor_pos(void)
|
|||
wc.lpfnWndProc = test_cursor_proc;
|
||||
wc.lpszClassName = "d3d8_test_cursor_wc";
|
||||
ok(RegisterClassA(&wc), "Failed to register window class.\n");
|
||||
window = CreateWindow("d3d8_test_cursor_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
window = CreateWindowA("d3d8_test_cursor_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
0, 0, 320, 240, NULL, NULL, NULL, NULL);
|
||||
ShowWindow(window, SW_SHOW);
|
||||
|
||||
|
@ -923,7 +927,8 @@ static void test_states(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -1517,7 +1522,8 @@ static void test_scene(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -1627,7 +1633,8 @@ static void test_shader(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -1840,7 +1847,8 @@ static void test_limits(void)
|
|||
|
||||
pD3d = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(pD3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!pD3d || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -1907,7 +1915,8 @@ static void test_lights(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d8 || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -1992,7 +2001,8 @@ static void test_render_zero_triangles(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d8 || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -2056,7 +2066,8 @@ static void test_depth_stencil_reset(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8(D3D_SDK_VERSION);
|
||||
ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d8 || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -2240,7 +2251,7 @@ static DWORD WINAPI wndproc_thread(void *param)
|
|||
{
|
||||
MSG msg;
|
||||
|
||||
while (PeekMessage(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessage(&msg);
|
||||
while (PeekMessageA(&msg, 0, 0, 0, PM_REMOVE)) DispatchMessageA(&msg);
|
||||
res = WaitForSingleObject(p->test_finished, 100);
|
||||
if (res == WAIT_OBJECT_0) break;
|
||||
if (res != WAIT_TIMEOUT)
|
||||
|
@ -2288,9 +2299,9 @@ static void test_wndproc(void)
|
|||
wc.lpszClassName = "d3d8_test_wndproc_wc";
|
||||
ok(RegisterClassA(&wc), "Failed to register window class.\n");
|
||||
|
||||
thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
thread_params.window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
thread_params.test_finished = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
|
||||
focus_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test",
|
||||
|
@ -2432,9 +2443,9 @@ static void test_wndproc_windowed(void)
|
|||
wc.lpszClassName = "d3d8_test_wndproc_wc";
|
||||
ok(RegisterClassA(&wc), "Failed to register window class.\n");
|
||||
|
||||
thread_params.window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
thread_params.window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!thread_params.window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
thread_params.test_finished = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
thread_params.test_finished = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!thread_params.test_finished, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
|
||||
focus_window = CreateWindowA("d3d8_test_wndproc_wc", "d3d8_test",
|
||||
|
@ -2715,7 +2726,8 @@ static void test_ApplyStateBlock(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d8 || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -2779,7 +2791,8 @@ static void test_depth_stencil_size(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8( D3D_SDK_VERSION );
|
||||
ok(d3d8 != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow( "d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d8 || !hwnd) goto cleanup;
|
||||
|
||||
|
@ -2964,7 +2977,8 @@ static void test_wrong_shader(void)
|
|||
|
||||
d3d = pDirect3DCreate8(D3D_SDK_VERSION);
|
||||
ok(d3d != NULL, "Failed to create IDirect3D8 object\n");
|
||||
hwnd = CreateWindow("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "Failed to create window\n");
|
||||
if (!d3d || !hwnd)
|
||||
goto cleanup;
|
||||
|
@ -3198,7 +3212,8 @@ static void depth_blit_test(void)
|
|||
|
||||
d3d8 = pDirect3DCreate8(D3D_SDK_VERSION);
|
||||
ok(d3d8 != NULL, "Direct3DCreate8 failed.\n");
|
||||
hwnd = CreateWindow("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
hwnd = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
ok(hwnd != NULL, "CreateWindow failed.\n");
|
||||
if (!d3d8 || !hwnd)
|
||||
goto done;
|
||||
|
@ -5744,16 +5759,16 @@ static void test_lockbox_invalid(void)
|
|||
START_TEST(device)
|
||||
{
|
||||
HMODULE d3d8_handle = LoadLibraryA( "d3d8.dll" );
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
if (!d3d8_handle)
|
||||
{
|
||||
skip("Could not load d3d8.dll\n");
|
||||
return;
|
||||
}
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "d3d8_test_wc";
|
||||
RegisterClass(&wc);
|
||||
RegisterClassA(&wc);
|
||||
|
||||
ValidateVertexShader = (void *)GetProcAddress(d3d8_handle, "ValidateVertexShader");
|
||||
ValidatePixelShader = (void *)GetProcAddress(d3d8_handle, "ValidatePixelShader");
|
||||
|
|
|
@ -25,12 +25,12 @@ static DWORD texture_stages;
|
|||
|
||||
static HWND create_window(void)
|
||||
{
|
||||
WNDCLASS wc = {0};
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
WNDCLASSA wc = {0};
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "d3d8_test_wc";
|
||||
RegisterClass(&wc);
|
||||
RegisterClassA(&wc);
|
||||
|
||||
return CreateWindow("d3d8_test_wc", "d3d8_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
return CreateWindowA("d3d8_test_wc", "d3d8_test", 0, 0, 0, 0, 0, 0, 0, 0, 0);
|
||||
}
|
||||
|
||||
static HRESULT init_d3d8(HMODULE d3d8_module, IDirect3DDevice8 **device, D3DPRESENT_PARAMETERS *device_pparams)
|
||||
|
|
|
@ -37,14 +37,14 @@ struct vec4
|
|||
|
||||
static HWND create_window(void)
|
||||
{
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
HWND ret;
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "d3d8_test_wc";
|
||||
RegisterClass(&wc);
|
||||
RegisterClassA(&wc);
|
||||
|
||||
ret = CreateWindow("d3d8_test_wc", "d3d8_test",
|
||||
WS_POPUP | WS_SYSMENU , 20, 20, 640, 480, 0, 0, 0, 0);
|
||||
ret = CreateWindowA("d3d8_test_wc", "d3d8_test", WS_POPUP | WS_SYSMENU,
|
||||
20, 20, 640, 480, 0, 0, 0, 0);
|
||||
ShowWindow(ret, SW_SHOW);
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue