ddraw/tests: Fix some test failures on 64-bit ddraw.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-08-14 16:34:35 +04:30 committed by Alexandre Julliard
parent 493f4098c6
commit f4ae6f537f
3 changed files with 75 additions and 45 deletions

View File

@ -12982,14 +12982,25 @@ static void test_caps(void)
ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps);
todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal),
"Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps);
if (is_ddraw64)
{
ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal),
"Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
}
else
{
todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
}
IDirectDraw_Release(ddraw);
}
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(hr == (is_ddraw64 ? E_FAIL : DD_OK), "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
memset(&hal_caps, 0, sizeof(hal_caps));
memset(&hel_caps, 0, sizeof(hel_caps));
hal_caps.dwSize = sizeof(hal_caps);
@ -13011,6 +13022,7 @@ static void test_caps(void)
IDirectDraw_Release(ddraw);
}
}
static void test_d32_support(void)
{

View File

@ -13862,13 +13862,25 @@ static void test_caps(void)
ok(!(~hal_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps);
todo_wine_if(no3d) ok(!(~hal_caps.ddsCaps.dwCaps & caps_hal),
"Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps);
if (is_ddraw64)
{
ok(!(hel_caps.ddsCaps.dwCaps & caps_never), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
ok(!(~hel_caps.ddsCaps.dwCaps & caps_always), "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
todo_wine_if(!no3d) ok(!(hel_caps.ddsCaps.dwCaps & caps_hal),
"Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
}
else
{
todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_caps.ddsCaps.dwCaps);
}
IDirectDraw2_Release(ddraw);
}
hr = DirectDrawCreate((GUID *)DDCREATE_EMULATIONONLY, &ddraw1, NULL);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
ok(hr == (is_ddraw64 ? E_FAIL : DD_OK), "Got unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
{
hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw);
ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr);
IDirectDraw_Release(ddraw1);
@ -13894,6 +13906,7 @@ static void test_caps(void)
IDirectDraw2_Release(ddraw);
}
}
static void test_d32_support(void)
{

View File

@ -8900,7 +8900,12 @@ static void test_palette_alpha(void)
surface_desc.dwHeight = 128;
surface_desc.ddsCaps.dwCaps = test_data[i].caps;
hr = IDirectDraw7_CreateSurface(ddraw, &surface_desc, &surface, NULL);
ok(SUCCEEDED(hr), "Failed to create %s surface, hr %#x.\n", test_data[i].name, hr);
if (is_ddraw64 && test_data[i].caps & DDSCAPS_TEXTURE)
todo_wine ok(hr == E_NOINTERFACE, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr);
else
ok(hr == DD_OK, "%s: Got unexpected hr %#x.\n", test_data[i].name, hr);
if (FAILED(hr))
continue;
hr = IDirectDrawSurface7_SetPalette(surface, palette);
if (test_data[i].attach_allowed)