From e1a1ae5e1b253a2fce929a015e6f4d1e399e22b6 Mon Sep 17 00:00:00 2001 From: Andrew Nguyen Date: Mon, 23 Mar 2009 01:42:58 -0500 Subject: [PATCH] ddraw/tests: Skip some cooperative level tests on NT4/Win95. The DirectX SDK reports that cooperative level flags DDSCL_SETDEVICEWINDOW and DDSCL_SETFOCUSWINDOW are only available on Windows 98 and higher. --- dlls/ddraw/tests/ddrawmodes.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c index 67dd9d4cbf4..e0bf526ac49 100644 --- a/dlls/ddraw/tests/ddrawmodes.c +++ b/dlls/ddraw/tests/ddrawmodes.c @@ -296,6 +296,13 @@ static void testcooperativelevels_normal(void) /* Set the focus window */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); + + if (rc == DDERR_INVALIDPARAMS) + { + win_skip("NT4/Win95 do not support cooperative levels DDSCL_SETDEVICEWINDOW and DDSCL_SETFOCUSWINDOW\n"); + return; + } + ok(rc==DD_OK,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); /* Set the focus window a second time*/ @@ -379,7 +386,8 @@ static void testcooperativelevels_exclusive(void) /* Set the focus window. Should fail */ rc = IDirectDraw_SetCooperativeLevel(lpDD, hwnd, DDSCL_SETFOCUSWINDOW); - ok(rc==DDERR_HWNDALREADYSET,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); + ok(rc==DDERR_HWNDALREADYSET || + broken(rc==DDERR_INVALIDPARAMS) /* NT4/Win95 */,"SetCooperativeLevel(DDSCL_SETFOCUSWINDOW) returned: %x\n",rc); /* All done */ -- 2.11.4.GIT