[PATCH] d3d9/tests Accept Windows 10 result
Detlef Riekenberg
wine.dev at web.de
Sun Mar 13 12:04:12 CDT 2016
According to the comment on line 2345, native needed a present
call to pick up a mode change.
Windows 10 is returning D3D_OK, so the recent behavior seems
to be better as before.
That's why I used D3D_OK as expected result, marked the old
S_PRESENT_MODE_CHANGED as broken and removed the wine_todo
Please confirm
--
Bye bye ... Detlef
Signed-off-by: Detlef Riekenberg <wine.dev at web.de>
---
dlls/d3d9/tests/d3d9ex.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c
index b74ae47..02049f1 100644
--- a/dlls/d3d9/tests/d3d9ex.c
+++ b/dlls/d3d9/tests/d3d9ex.c
@@ -1560,14 +1560,18 @@ static void test_lost_device(void)
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
hr = IDirect3DDevice9Ex_TestCooperativeLevel(device);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
+ /* S_OK is returned on Windows 10. Older versions returned S_PRESENT_MODE_CHANGED */
hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x.\n", hr);
+ /* S_OK is returned on Windows 10. Older versions returned S_PRESENT_MODE_CHANGED */
hr = IDirect3DDevice9Ex_PresentEx(device, NULL, NULL, NULL, NULL, 0);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x.\n", hr);
+ /* S_OK is returned on Windows 10. Older versions returned S_PRESENT_MODE_CHANGED */
hr = IDirect3DDevice9Ex_CheckDeviceState(device, window);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x.\n", hr);
+ /* S_OK is returned on Windows 10. Older versions returned S_PRESENT_MODE_CHANGED */
hr = IDirect3DDevice9Ex_CheckDeviceState(device, NULL);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x.\n", hr);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x.\n", hr);
hr = reset_device(device, &desc);
ok(hr == D3D_OK, "Got unexpected hr %#x.\n", hr);
@@ -2342,11 +2346,11 @@ static void test_wndproc(void)
change_ret = ChangeDisplaySettingsW(&devmode, CDS_FULLSCREEN);
ok(change_ret == DISP_CHANGE_SUCCESSFUL, "Failed to change display mode, ret %#x, i=%u.\n", change_ret, i);
- /* Native needs a present call to pick up the mode change. */
+ /* Native before Windows 10 needs a present call to pick up the mode change. */
hr = IDirect3DDevice9Ex_Present(device, NULL, NULL, NULL, NULL);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x, i=%u.\n", hr, i);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x, i=%u.\n", hr, i);
hr = IDirect3DDevice9Ex_CheckDeviceState(device, device_window);
- todo_wine ok(hr == S_PRESENT_MODE_CHANGED, "Got unexpected hr %#x, i=%u.\n", hr, i);
+ ok(hr == D3D_OK || broken(hr == S_PRESENT_MODE_CHANGED), "Got unexpected hr %#x, i=%u.\n", hr, i);
expect_messages = tests[i].focus_loss_messages;
/* SetForegroundWindow is a poor replacement for the user pressing alt-tab or
--
2.5.0
More information about the wine-patches
mailing list