diff --git a/dlls/ddraw/tests/ddraw1.c b/dlls/ddraw/tests/ddraw1.c index 5ab1c80ba78..c306c4db1a3 100644 --- a/dlls/ddraw/tests/ddraw1.c +++ b/dlls/ddraw/tests/ddraw1.c @@ -2281,9 +2281,9 @@ static void test_redundant_mode_set(void) { DDSURFACEDESC surface_desc = {0}; IDirectDraw *ddraw; + RECT q, r, s; HWND window; HRESULT hr; - RECT r, s; ULONG ref; window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, @@ -2302,7 +2302,8 @@ static void test_redundant_mode_set(void) U1(surface_desc.ddpfPixelFormat).dwRGBBitCount); ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); - GetWindowRect(window, &r); + GetWindowRect(window, &q); + r = q; r.right /= 2; r.bottom /= 2; SetWindowPos(window, HWND_TOP, r.left, r.top, r.right, r.bottom, 0); @@ -2314,7 +2315,8 @@ static void test_redundant_mode_set(void) ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); GetWindowRect(window, &s); - ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); + ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), + "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); ref = IDirectDraw_Release(ddraw); ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); diff --git a/dlls/ddraw/tests/ddraw2.c b/dlls/ddraw/tests/ddraw2.c index ca349be633d..8a7801ee3e5 100644 --- a/dlls/ddraw/tests/ddraw2.c +++ b/dlls/ddraw/tests/ddraw2.c @@ -2414,9 +2414,9 @@ static void test_redundant_mode_set(void) { DDSURFACEDESC surface_desc = {0}; IDirectDraw2 *ddraw; + RECT q, r, s; HWND window; HRESULT hr; - RECT r, s; ULONG ref; window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, @@ -2435,7 +2435,8 @@ static void test_redundant_mode_set(void) U1(surface_desc.ddpfPixelFormat).dwRGBBitCount, 0, 0); ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); - GetWindowRect(window, &r); + GetWindowRect(window, &q); + r = q; r.right /= 2; r.bottom /= 2; SetWindowPos(window, HWND_TOP, r.left, r.top, r.right, r.bottom, 0); @@ -2447,7 +2448,8 @@ static void test_redundant_mode_set(void) ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); GetWindowRect(window, &s); - ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); + ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), + "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); ref = IDirectDraw2_Release(ddraw); ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); diff --git a/dlls/ddraw/tests/ddraw4.c b/dlls/ddraw/tests/ddraw4.c index bad06ea37fd..048331dfc39 100644 --- a/dlls/ddraw/tests/ddraw4.c +++ b/dlls/ddraw/tests/ddraw4.c @@ -2552,9 +2552,9 @@ static void test_redundant_mode_set(void) { DDSURFACEDESC2 surface_desc = {0}; IDirectDraw4 *ddraw; + RECT q, r, s; HWND window; HRESULT hr; - RECT r, s; ULONG ref; window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, @@ -2573,7 +2573,8 @@ static void test_redundant_mode_set(void) U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); - GetWindowRect(window, &r); + GetWindowRect(window, &q); + r = q; r.right /= 2; r.bottom /= 2; SetWindowPos(window, HWND_TOP, r.left, r.top, r.right, r.bottom, 0); @@ -2585,7 +2586,8 @@ static void test_redundant_mode_set(void) ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); GetWindowRect(window, &s); - ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); + ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), + "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); ref = IDirectDraw4_Release(ddraw); ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref); diff --git a/dlls/ddraw/tests/ddraw7.c b/dlls/ddraw/tests/ddraw7.c index 5e176c77205..d1ff85d5d54 100644 --- a/dlls/ddraw/tests/ddraw7.c +++ b/dlls/ddraw/tests/ddraw7.c @@ -2279,9 +2279,9 @@ static void test_redundant_mode_set(void) { DDSURFACEDESC2 surface_desc = {0}; IDirectDraw7 *ddraw; + RECT q, r, s; HWND window; HRESULT hr; - RECT r, s; ULONG ref; window = CreateWindowA("static", "ddraw_test", WS_OVERLAPPEDWINDOW, @@ -2299,7 +2299,8 @@ static void test_redundant_mode_set(void) U1(U4(surface_desc).ddpfPixelFormat).dwRGBBitCount, 0, 0); ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); - GetWindowRect(window, &r); + GetWindowRect(window, &q); + r = q; r.right /= 2; r.bottom /= 2; SetWindowPos(window, HWND_TOP, r.left, r.top, r.right, r.bottom, 0); @@ -2311,7 +2312,8 @@ static void test_redundant_mode_set(void) ok(SUCCEEDED(hr), "SetDisplayMode failed, hr %#x.\n", hr); GetWindowRect(window, &s); - ok(EqualRect(&r, &s), "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); + ok(EqualRect(&r, &s) || broken(EqualRect(&q, &s) /* Windows 10 */), + "Expected %s, got %s.\n", wine_dbgstr_rect(&r), wine_dbgstr_rect(&s)); ref = IDirectDraw7_Release(ddraw); ok(ref == 0, "The ddraw object was not properly freed: refcount %u.\n", ref);