Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/ddraw/tests/ddraw1.c | 54 ++++++++++++++++++++++++++----------------- dlls/ddraw/tests/ddraw2.c | 59 +++++++++++++++++++++++++++++------------------ dlls/ddraw/tests/ddraw7.c | 7 +++++- 3 files changed, 75 insertions(+), 45 deletions(-)
diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index acf8dd8e2f0..cc228028e17 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -12982,34 +12982,46 @@ 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); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_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); - - memset(&hal_caps, 0, sizeof(hal_caps)); - memset(&hel_caps, 0, sizeof(hel_caps)); - hal_caps.dwSize = sizeof(hal_caps); - hel_caps.dwSize = sizeof(hel_caps); - hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); - ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + 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); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - 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); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + 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);
- IDirectDraw_Release(ddraw); + IDirectDraw_Release(ddraw); + } }
static void test_d32_support(void) diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 33bc94326fa..595157b486f 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -13862,37 +13862,50 @@ 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); - todo_wine ok(!hel_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hel_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); - hr = IDirectDraw_QueryInterface(ddraw1, &IID_IDirectDraw2, (void **)&ddraw); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - IDirectDraw_Release(ddraw1); + 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);
- memset(&hal_caps, 0, sizeof(hal_caps)); - memset(&hel_caps, 0, sizeof(hel_caps)); - hal_caps.dwSize = sizeof(hal_caps); - hel_caps.dwSize = sizeof(hel_caps); - hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); - ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, - "Got unexpected caps %#x, expected %#x.\n", - hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps); + memset(&hal_caps, 0, sizeof(hal_caps)); + memset(&hel_caps, 0, sizeof(hel_caps)); + hal_caps.dwSize = sizeof(hal_caps); + hel_caps.dwSize = sizeof(hel_caps); + hr = IDirectDraw2_GetCaps(ddraw, &hal_caps, &hel_caps); + ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); + ok(hal_caps.ddsOldCaps.dwCaps == hal_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hal_caps.ddsOldCaps.dwCaps, hal_caps.ddsCaps.dwCaps); + ok(hel_caps.ddsOldCaps.dwCaps == hel_caps.ddsCaps.dwCaps, + "Got unexpected caps %#x, expected %#x.\n", + hel_caps.ddsOldCaps.dwCaps, hel_caps.ddsCaps.dwCaps);
- todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); - 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); + todo_wine ok(!hal_caps.ddsCaps.dwCaps, "Got unexpected caps %#x.\n", hal_caps.ddsCaps.dwCaps); + 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);
- IDirectDraw2_Release(ddraw); + IDirectDraw2_Release(ddraw); + } }
static void test_d32_support(void) diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 4027c722190..116e34a1768 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -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)