Andrew Nguyen : ddraw/tests: Skip some cooperative level tests on NT4/Win95 .
Alexandre Julliard
julliard at winehq.org
Mon Mar 23 12:34:58 CDT 2009
Module: wine
Branch: master
Commit: e1a1ae5e1b253a2fce929a015e6f4d1e399e22b6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e1a1ae5e1b253a2fce929a015e6f4d1e399e22b6
Author: Andrew Nguyen <arethusa26 at gmail.com>
Date: Mon Mar 23 01:42:58 2009 -0500
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 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/dlls/ddraw/tests/ddrawmodes.c b/dlls/ddraw/tests/ddrawmodes.c
index 67dd9d4..e0bf526 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 */
More information about the wine-cvs
mailing list