ddraw/tests: Use explicit A calls.
This commit is contained in:
parent
3e5dd54971
commit
026dc11677
|
@ -1,6 +1,5 @@
|
|||
TESTDLL = ddraw.dll
|
||||
IMPORTS = ddraw user32 gdi32 ole32
|
||||
EXTRADEFS = -U__WINESRC__ -DWINE_STRICT_PROTOTYPES -DWINE_NO_NAMELESS_EXTENSION -DWIDL_C_INLINE_WRAPPERS
|
||||
|
||||
C_SRCS = \
|
||||
d3d.c \
|
||||
|
|
|
@ -3431,7 +3431,8 @@ static void BackBuffer3DAttachmentTest(void)
|
|||
HRESULT hr;
|
||||
IDirectDrawSurface *surface1, *surface2, *surface3, *surface4;
|
||||
DDSURFACEDESC ddsd;
|
||||
HWND window = CreateWindow( "static", "ddraw_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
HWND window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
|
||||
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
|
||||
ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr);
|
||||
|
|
|
@ -56,8 +56,8 @@ static DWORD WINAPI create_window_thread_proc(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->destroy_window, 100);
|
||||
if (res == WAIT_OBJECT_0)
|
||||
break;
|
||||
|
@ -77,9 +77,9 @@ static void create_window_thread(struct create_window_thread_param *p)
|
|||
{
|
||||
DWORD res, tid;
|
||||
|
||||
p->window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->destroy_window = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid);
|
||||
ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError());
|
||||
|
|
|
@ -56,8 +56,8 @@ static DWORD WINAPI create_window_thread_proc(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->destroy_window, 100);
|
||||
if (res == WAIT_OBJECT_0)
|
||||
break;
|
||||
|
@ -77,9 +77,9 @@ static void create_window_thread(struct create_window_thread_param *p)
|
|||
{
|
||||
DWORD res, tid;
|
||||
|
||||
p->window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->destroy_window = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid);
|
||||
ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError());
|
||||
|
|
|
@ -96,8 +96,8 @@ static DWORD WINAPI create_window_thread_proc(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->destroy_window, 100);
|
||||
if (res == WAIT_OBJECT_0)
|
||||
break;
|
||||
|
@ -117,9 +117,9 @@ static void create_window_thread(struct create_window_thread_param *p)
|
|||
{
|
||||
DWORD res, tid;
|
||||
|
||||
p->window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->destroy_window = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid);
|
||||
ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError());
|
||||
|
|
|
@ -105,8 +105,8 @@ static DWORD WINAPI create_window_thread_proc(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->destroy_window, 100);
|
||||
if (res == WAIT_OBJECT_0)
|
||||
break;
|
||||
|
@ -126,9 +126,9 @@ static void create_window_thread(struct create_window_thread_param *p)
|
|||
{
|
||||
DWORD res, tid;
|
||||
|
||||
p->window_created = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->window_created = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->window_created, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->destroy_window = CreateEvent(NULL, FALSE, FALSE, NULL);
|
||||
p->destroy_window = CreateEventA(NULL, FALSE, FALSE, NULL);
|
||||
ok(!!p->destroy_window, "CreateEvent failed, last error %#x.\n", GetLastError());
|
||||
p->thread = CreateThread(NULL, 0, create_window_thread_proc, p, 0, &tid);
|
||||
ok(!!p->thread, "Failed to create thread, last error %#x.\n", GetLastError());
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
static IDirectDrawSurface *lpDDSPrimary;
|
||||
static IDirectDrawSurface *lpDDSBack;
|
||||
static IDirectDraw *lpDD;
|
||||
static WNDCLASS wc;
|
||||
static WNDCLASSA wc;
|
||||
static HWND hwnd, hwnd2;
|
||||
static int modes_cnt;
|
||||
static int modes_size;
|
||||
|
@ -623,7 +623,7 @@ static void testsurface(void)
|
|||
ok(rc==DD_OK, "IDirectDrawSurface_GetDC returned: %x\n",rc);
|
||||
SetBkColor(hdc, RGB(0, 0, 255));
|
||||
SetTextColor(hdc, RGB(255, 255, 0));
|
||||
TextOut(hdc, 0, 0, testMsg, lstrlen(testMsg));
|
||||
TextOutA(hdc, 0, 0, testMsg, strlen(testMsg));
|
||||
rc = IDirectDrawSurface_ReleaseDC(lpDDSBack, hdc);
|
||||
ok(rc==DD_OK, "IDirectDrawSurface_ReleaseDC returned: %x\n",rc);
|
||||
|
||||
|
@ -979,13 +979,8 @@ START_TEST(ddrawmodes)
|
|||
|
||||
wc.style = CS_HREDRAW | CS_VREDRAW;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.cbClsExtra = 0;
|
||||
wc.cbWndExtra = 0;
|
||||
wc.hInstance = GetModuleHandleA(0);
|
||||
wc.hIcon = LoadIconA(wc.hInstance, IDI_APPLICATION);
|
||||
wc.hCursor = LoadCursorA(NULL, IDC_ARROW);
|
||||
wc.hbrBackground = GetStockObject(BLACK_BRUSH);
|
||||
wc.lpszMenuName = NULL;
|
||||
wc.lpszClassName = "TestWindowClass";
|
||||
if (!RegisterClassA(&wc))
|
||||
{
|
||||
|
|
|
@ -1129,7 +1129,8 @@ static void AttachmentTest7(void)
|
|||
DWORD ref;
|
||||
UINT num;
|
||||
DDSCAPS2 caps = {DDSCAPS_TEXTURE, 0, 0, 0}, caps2 = {DDSCAPS_BACKBUFFER,0,0,0};
|
||||
HWND window = CreateWindow( "static", "ddraw_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
HWND window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
|
||||
hr = IDirectDraw_QueryInterface(lpDD, &IID_IDirectDraw7, (void **) &dd7);
|
||||
ok(hr == DD_OK, "IDirectDraw_QueryInterface returned %08x\n", hr);
|
||||
|
@ -1429,7 +1430,8 @@ static void AttachmentTest(void)
|
|||
DWORD ref;
|
||||
DDSCAPS caps = {DDSCAPS_TEXTURE};
|
||||
BOOL refrast = FALSE;
|
||||
HWND window = CreateWindow( "static", "ddraw_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
HWND window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
|
||||
memset(&ddsd, 0, sizeof(ddsd));
|
||||
ddsd.dwSize = sizeof(ddsd);
|
||||
|
@ -2507,7 +2509,8 @@ static void SizeTest(void)
|
|||
IDirectDrawSurface *dsurface = NULL;
|
||||
DDSURFACEDESC desc;
|
||||
HRESULT ret;
|
||||
HWND window = CreateWindow( "static", "ddraw_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
HWND window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
|
||||
/* Create an offscreen surface surface without a size */
|
||||
ZeroMemory(&desc, sizeof(desc));
|
||||
|
@ -3732,7 +3735,8 @@ static void BackBufferAttachmentFlipTest(void)
|
|||
HRESULT hr;
|
||||
IDirectDrawSurface *surface1, *surface2, *surface3, *surface4;
|
||||
DDSURFACEDESC ddsd;
|
||||
HWND window = CreateWindow( "static", "ddraw_test", WS_OVERLAPPEDWINDOW, 100, 100, 160, 160, NULL, NULL, NULL, NULL );
|
||||
HWND window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW,
|
||||
100, 100, 160, 160, NULL, NULL, NULL, NULL);
|
||||
|
||||
hr = IDirectDraw_SetCooperativeLevel(lpDD, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
|
||||
ok(hr == DD_OK, "SetCooperativeLevel returned %08x\n", hr);
|
||||
|
|
|
@ -80,7 +80,7 @@ static BOOL createObjects(void)
|
|||
{
|
||||
HRESULT hr;
|
||||
HMODULE hmod = GetModuleHandleA("ddraw.dll");
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
DDSURFACEDESC2 ddsd;
|
||||
DDPIXELFORMAT zfmt;
|
||||
BOOL hal_ok = FALSE;
|
||||
|
@ -94,10 +94,11 @@ static BOOL createObjects(void)
|
|||
ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreateEx returned: %x\n", hr);
|
||||
if(!DirectDraw) goto err;
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "d3d7_test_wc";
|
||||
RegisterClass(&wc);
|
||||
window = CreateWindow("d3d7_test_wc", "d3d7_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
RegisterClassA(&wc);
|
||||
window = CreateWindowA("d3d7_test_wc", "d3d7_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION,
|
||||
0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
||||
hr = IDirectDraw7_SetCooperativeLevel(DirectDraw, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
|
||||
ok(hr == DD_OK, "IDirectDraw7_SetCooperativeLevel failed with %08x\n", hr);
|
||||
|
@ -1141,7 +1142,7 @@ static void rhw_zero_test(IDirect3DDevice7 *device)
|
|||
|
||||
static BOOL D3D1_createObjects(void)
|
||||
{
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
HRESULT hr;
|
||||
DDSURFACEDESC ddsd;
|
||||
D3DEXECUTEBUFFERDESC exdesc;
|
||||
|
@ -1155,10 +1156,11 @@ static BOOL D3D1_createObjects(void)
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "texturemapblend_test_wc";
|
||||
RegisterClass(&wc);
|
||||
window = CreateWindow("texturemapblend_test_wc", "texturemapblend_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
RegisterClassA(&wc);
|
||||
window = CreateWindowA("texturemapblend_test_wc", "texturemapblend_test",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
||||
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
|
||||
ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr);
|
||||
|
@ -2223,7 +2225,7 @@ static void D3D3_ViewportClearTest(void)
|
|||
IDirect3DViewport3 *Viewport3 = NULL;
|
||||
IDirect3DViewport3 *SmallViewport3 = NULL;
|
||||
IDirect3DDevice3 *Direct3DDevice3 = NULL;
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
DDSURFACEDESC2 ddsd;
|
||||
D3DVIEWPORT2 vp_data;
|
||||
DWORD color, red, green, blue;
|
||||
|
@ -2243,11 +2245,11 @@ static void D3D3_ViewportClearTest(void)
|
|||
WORD Indices[] = {0, 1, 2, 2, 3, 0};
|
||||
DWORD fvf = D3DFVF_XYZ | D3DFVF_DIFFUSE;
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "D3D3_ViewportClearTest_wc";
|
||||
RegisterClass(&wc);
|
||||
window = CreateWindow("D3D3_ViewportClearTest_wc", "D3D3_ViewportClearTest",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
RegisterClassA(&wc);
|
||||
window = CreateWindowA("D3D3_ViewportClearTest_wc", "D3D3_ViewportClearTest",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
||||
hr = DirectDrawCreate( NULL, &DirectDraw1, NULL );
|
||||
ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr);
|
||||
|
@ -2494,7 +2496,7 @@ static void p8_primary_test(void)
|
|||
UINT i, i1, i2;
|
||||
IDirectDrawPalette *ddprimpal = NULL;
|
||||
IDirectDrawSurface *offscreen = NULL;
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
DDBLTFX ddbltfx;
|
||||
COLORREF color;
|
||||
RECT rect;
|
||||
|
@ -2509,10 +2511,11 @@ static void p8_primary_test(void)
|
|||
goto out;
|
||||
}
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "p8_primary_test_wc";
|
||||
RegisterClass(&wc);
|
||||
window = CreateWindow("p8_primary_test_wc", "p8_primary_test", WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
RegisterClassA(&wc);
|
||||
window = CreateWindowA("p8_primary_test_wc", "p8_primary_test",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
||||
hr = IDirectDraw_SetCooperativeLevel(DirectDraw1, window, DDSCL_EXCLUSIVE | DDSCL_FULLSCREEN);
|
||||
ok(hr==DD_OK, "SetCooperativeLevel returned: %x\n", hr);
|
||||
|
@ -3084,7 +3087,7 @@ static void DX1_BackBufferFlipTest(void)
|
|||
IDirectDraw *DirectDraw1 = NULL;
|
||||
IDirectDrawSurface *Primary = NULL;
|
||||
IDirectDrawSurface *Backbuffer = NULL;
|
||||
WNDCLASS wc = {0};
|
||||
WNDCLASSA wc = {0};
|
||||
DDSURFACEDESC ddsd;
|
||||
DDBLTFX ddbltfx;
|
||||
COLORREF color;
|
||||
|
@ -3092,11 +3095,11 @@ static void DX1_BackBufferFlipTest(void)
|
|||
const DWORD red = 0xff0000;
|
||||
BOOL attached = FALSE;
|
||||
|
||||
wc.lpfnWndProc = DefWindowProc;
|
||||
wc.lpfnWndProc = DefWindowProcA;
|
||||
wc.lpszClassName = "DX1_BackBufferFlipTest_wc";
|
||||
RegisterClass(&wc);
|
||||
window = CreateWindow("DX1_BackBufferFlipTest_wc", "DX1_BackBufferFlipTest",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION , 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
RegisterClassA(&wc);
|
||||
window = CreateWindowA("DX1_BackBufferFlipTest_wc", "DX1_BackBufferFlipTest",
|
||||
WS_MAXIMIZE | WS_VISIBLE | WS_CAPTION, 0, 0, 640, 480, 0, 0, 0, 0);
|
||||
|
||||
hr = DirectDrawCreate( NULL, &DirectDraw1, NULL );
|
||||
ok(hr==DD_OK || hr==DDERR_NODIRECTDRAWSUPPORT, "DirectDrawCreate returned: %x\n", hr);
|
||||
|
|
Loading…
Reference in New Issue