Signed-off-by: Stefan Dösinger stefan@codeweavers.com --- dlls/d3d8/tests/device.c | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/dlls/d3d8/tests/device.c b/dlls/d3d8/tests/device.c index c288e1ef557..f30e0784e8b 100644 --- a/dlls/d3d8/tests/device.c +++ b/dlls/d3d8/tests/device.c @@ -1235,6 +1235,20 @@ static void test_cursor_pos(void) {0, 0}, };
+ /* Windows 10 1709 is unreliable. One or more of the cursor movements we + * expect don't show up. Moving the mouse to a defined position beforehand + * seems to get it into better shape - only the final 150x150 move we do + * below is missing - it looks as if this Windows version filters redundant + * SetCursorPos calls on the user32 level, although I am not entirely sure. + * + * The weird thing is that the previous test leaves the cursor position + * reliably at 512x384 on the testbot. So the 50x50 mouse move shouldn't + * be stripped away anyway, but it might be a difference between moving the + * cursor through SetCursorPos vs moving it by changing the display mode. */ + ret = SetCursorPos(99, 99); + ok(ret, "Failed to set cursor position.\n"); + flush_events(); + wc.lpfnWndProc = test_cursor_proc; wc.lpszClassName = "d3d8_test_cursor_wc"; ok(RegisterClassA(&wc), "Failed to register window class.\n"); @@ -1267,7 +1281,8 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0); flush_events(); - /* SetCursorPosition() eats duplicates. */ + /* SetCursorPosition() eats duplicates. FIXME: Since we accept unexpected + * mouse moves the test doesn't actually demonstrate that. */ IDirect3DDevice8_SetCursorPosition(device, 75, 75, 0); flush_events();
@@ -1288,13 +1303,14 @@ static void test_cursor_pos(void)
IDirect3DDevice8_SetCursorPosition(device, 150, 150, 0); flush_events(); - /* SetCursorPos() doesn't. */ + /* SetCursorPos() doesn't. Except for Win10 1709. */ ret = SetCursorPos(150, 150); ok(ret, "Failed to set cursor position.\n"); flush_events();
- ok(!expect_pos->x && !expect_pos->y, "Didn't receive MOUSEMOVE %u (%d, %d).\n", - (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y); + ok((!expect_pos->x && !expect_pos->y) || broken(expect_pos - points == 7), + "Didn't receive MOUSEMOVE %u (%d, %d).\n", + (unsigned)(expect_pos - points), expect_pos->x, expect_pos->y);
refcount = IDirect3DDevice8_Release(device); ok(!refcount, "Device has %u references left.\n", refcount);