ddraw/tests: Redundant mode sets are broken on Windows 10.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2017-12-05 22:36:52 +03:30 committed by Alexandre Julliard
parent 960017a4d4
commit eebf1181f9
4 changed files with 20 additions and 12 deletions

View File

@ -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);

View File

@ -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);

View File

@ -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);

View File

@ -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);