[PATCH 4/4] d3d9/tests: Windows 10 15.07 doesn't detect external mode changes.
Stefan Dösinger
stefan at codeweavers.com
Thu Oct 19 03:09:22 CDT 2017
Signed-off-by: Stefan Dösinger <stefan at codeweavers.com>
---
This fixes this test failure:
http://test.winehq.org/data/9787af34b1c23deb67902fc7dbf2c8421b987048/win10_newtb-w1064-32/d3d9:d3d9ex.html
What I have tried to debug or try to work around this issue:
*) Checked that the resolution is actually changed. It is changed from
640x480 to 800x600.
*) IDirect3DSwapchain9Ex::GetDisplayModeEx sees the new mode. Calling
this method does not make Present see it though.
*) Replace Present with PresentEx.
*) Call flush_events before calling Present.
I'm happy to try more ideas, but I think this is just broken in this
Windows build. It is working OK in my 17.03 VM, and I believe it was
working on 16.07 too, but I don't have 16.07 around anymore because it
auto updated to 17.03...
---
dlls/d3d9/tests/d3d9ex.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/dlls/d3d9/tests/d3d9ex.c b/dlls/d3d9/tests/d3d9ex.c
index 59a1daf3c9..9dd3553384 100644
--- a/dlls/d3d9/tests/d3d9ex.c
+++ b/dlls/d3d9/tests/d3d9ex.c
@@ -2843,11 +2843,13 @@ 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 needs a present call to pick up the mode change. Windows 10 15.07 never picks up the mode change
+ * in these calls and returns S_OK. This is a regression from Windows 8 and has been fixed in later Win10
+ * builds. */
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);
+ todo_wine ok(hr == S_PRESENT_MODE_CHANGED || broken(hr == S_OK), "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);
+ todo_wine ok(hr == S_PRESENT_MODE_CHANGED || broken(hr == S_OK), "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.13.6
More information about the wine-patches
mailing list