Signed-off-by: Matteo Bruni mbruni@codeweavers.com --- dlls/d3d9/tests/d3d9ex.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c index 81dd5912b23..1d709cb5dde 100644 --- a/dlls/d3d9/tests/d3d9ex.c +++ b/dlls/d3d9/tests/d3d9ex.c @@ -2058,20 +2058,21 @@ static void test_lost_device(void) hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || broken(hr == D3D_OK), "Got unexpected hr %#x.\n", hr);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirect3DDevice9Ex_TestCooperativeLevel(device); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == S_PRESENT_MODE_CHANGED || broken(hr == D3D_OK), + "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_PresentEx(device, NULL, NULL, NULL, NULL, 0); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr);
ret = SetForegroundWindow(window); ok(ret, "Failed to set foreground window.\n"); @@ -2084,7 +2085,7 @@ static void test_lost_device(void) hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
desc.width = 1024; desc.height = 768; @@ -2099,7 +2100,7 @@ static void test_lost_device(void) hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
desc.flags = 0; hr = reset_device(device, &desc); @@ -2166,24 +2167,24 @@ static void test_lost_device(void) hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
ret = SetForegroundWindow(GetDesktopWindow()); ok(ret, "Failed to set foreground window.\n"); hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || broken(hr == D3D_OK), "Got unexpected hr %#x.\n", hr); hr = reset_device(device, &desc); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_TestCooperativeLevel(device); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || broken(hr == S_FALSE), "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_PresentEx(device, NULL, NULL, NULL, NULL, 0); - ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); + ok(hr == D3D_OK || broken(hr == S_FALSE), "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, window); ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr); hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL); - ok(hr == S_PRESENT_OCCLUDED, "Got unexpected hr %#x.\n", hr); + ok(hr == S_PRESENT_OCCLUDED || hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
refcount = IDirect3DDevice9Ex_Release(device); ok(!refcount, "Device has %u references left.\n", refcount);