Rémi Bernon : dinput/tests: Avoid requiring foreground window in SetCooperativeLevel tests.
Alexandre Julliard
julliard at winehq.org
Thu Jun 9 16:28:33 CDT 2022
Module: wine
Branch: master
Commit: 4e04c710ad4d63163e1452919eeff6e1084bca15
URL: https://source.winehq.org/git/wine.git/?a=commit;h=4e04c710ad4d63163e1452919eeff6e1084bca15
Author: Rémi Bernon <rbernon at codeweavers.com>
Date: Wed Jun 8 18:03:46 2022 +0200
dinput/tests: Avoid requiring foreground window in SetCooperativeLevel tests.
Signed-off-by: Rémi Bernon <rbernon at codeweavers.com>
---
dlls/dinput/tests/joystick8.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/dinput/tests/joystick8.c b/dlls/dinput/tests/joystick8.c
index 070d9cc2361..e4c676c4b33 100644
--- a/dlls/dinput/tests/joystick8.c
+++ b/dlls/dinput/tests/joystick8.c
@@ -1252,7 +1252,6 @@ static void test_simple_joystick( DWORD version )
hwnd = CreateWindowW( L"static", L"dinput", WS_OVERLAPPEDWINDOW | WS_VISIBLE, 10, 10, 200, 200,
NULL, NULL, NULL, NULL );
- SetForegroundWindow( hwnd );
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_NONEXCLUSIVE );
ok( hr == DI_OK, "SetCooperativeLevel returned: %#lx\n", hr );
@@ -1261,6 +1260,8 @@ static void test_simple_joystick( DWORD version )
hr = IDirectInputDevice8_SetCooperativeLevel( device, hwnd, DISCL_FOREGROUND | DISCL_EXCLUSIVE );
ok( hr == DI_OK, "SetCooperativeLevel returned: %#lx\n", hr );
+ hr = IDirectInputDevice8_SetCooperativeLevel( device, NULL, DISCL_BACKGROUND | DISCL_NONEXCLUSIVE );
+ ok( hr == DI_OK, "SetCooperativeLevel returned: %#lx\n", hr );
hr = IDirectInputDevice8_Unacquire( device );
ok( hr == DI_NOEFFECT, "Unacquire returned: %#lx\n", hr );
hr = IDirectInputDevice8_Acquire( device );
More information about the wine-cvs
mailing list