dinput8/tests: Make sure SetCooperativeLevel window is foreground.

This should prevent spurious failures on Windows.

Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Rémi Bernon 2021-11-16 08:23:35 +01:00 committed by Alexandre Julliard
parent a4fe643920
commit 98a0a75610
1 changed files with 1 additions and 0 deletions

View File

@ -4267,6 +4267,7 @@ static void test_simple_joystick(void)
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: %#x\n", hr );