diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index 541362c7488..a2a27d86f01 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -1010,9 +1010,12 @@ static void test_coop_level_d3d_state(void) hr = IDirect3DDevice2_DrawPrimitive(device, D3DPT_TRIANGLESTRIP, D3DVT_LVERTEX, quad, ARRAY_SIZE(quad), 0); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice2_EndScene(device); - ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); - color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); + ok(hr == DD_OK || broken(ddraw_is_warp(ddraw) && hr == DDERR_SURFACELOST), "Got unexpected hr %#x.\n", hr); + if (hr == DD_OK) + { + color = get_surface_color(rt, 320, 240); + ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); + } destroy_viewport(device, viewport); destroy_material(background); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index 8cadfae52a0..77cf6f45114 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -1171,7 +1171,6 @@ static void test_coop_level_d3d_state(void) ok(hr == DDERR_SURFACELOST, "Got unexpected hr %#x.\n", hr); hr = IDirectDraw4_RestoreAllSurfaces(ddraw); ok(SUCCEEDED(hr), "Failed to restore surfaces, hr %#x.\n", hr); - IDirectDraw4_Release(ddraw); hr = IDirect3DDevice3_GetRenderTarget(device, &surface); ok(SUCCEEDED(hr), "Failed to get render target, hr %#x.\n", hr); @@ -1197,12 +1196,15 @@ static void test_coop_level_d3d_state(void) hr = IDirect3DDevice3_EndScene(device); ok(hr == DD_OK, "Got unexpected hr %#x.\n", hr); color = get_surface_color(rt, 320, 240); - ok(compare_color(color, 0x0000ff80, 1), "Got unexpected color 0x%08x.\n", color); + ok(compare_color(color, 0x0000ff80, 1) + || broken(ddraw_is_warp(ddraw) && compare_color(color, 0x0000ff00, 0)), + "Got unexpected color 0x%08x.\n", color); destroy_viewport(device, viewport); IDirectDrawSurface4_Release(surface); IDirectDrawSurface4_Release(rt); IDirect3DDevice3_Release(device); + IDirectDraw4_Release(ddraw); DestroyWindow(window); }