Commit 65952526 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

dinput/tests: Increase timeouts for waits not supposed to fail.

parent 07753da9
...@@ -316,12 +316,12 @@ void test_overlapped_format( DWORD version ) ...@@ -316,12 +316,12 @@ void test_overlapped_format( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 ); keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 ); keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -332,7 +332,7 @@ void test_overlapped_format( DWORD version ) ...@@ -332,7 +332,7 @@ void test_overlapped_format( DWORD version )
/* press D */ /* press D */
keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE, 0 ); keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -352,7 +352,7 @@ void test_overlapped_format( DWORD version ) ...@@ -352,7 +352,7 @@ void test_overlapped_format( DWORD version )
/* release D */ /* release D */
keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 ); keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -378,12 +378,12 @@ void test_overlapped_format( DWORD version ) ...@@ -378,12 +378,12 @@ void test_overlapped_format( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 ); keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 ); keybd_event( 0, DIK_F, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -394,7 +394,7 @@ void test_overlapped_format( DWORD version ) ...@@ -394,7 +394,7 @@ void test_overlapped_format( DWORD version )
/* press D */ /* press D */
keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE, 0 ); keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -414,7 +414,7 @@ void test_overlapped_format( DWORD version ) ...@@ -414,7 +414,7 @@ void test_overlapped_format( DWORD version )
/* release D */ /* release D */
keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 ); keybd_event( 0, DIK_D, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
count = 10; count = 10;
...@@ -458,12 +458,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c ...@@ -458,12 +458,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
keybd_event( 0, code, KEYEVENTF_SCANCODE, 0 ); keybd_event( 0, code, KEYEVENTF_SCANCODE, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
keybd_event( 0, code, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 ); keybd_event( 0, code, KEYEVENTF_SCANCODE | KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
} }
if (type == INPUT_MOUSE) if (type == INPUT_MOUSE)
...@@ -473,12 +473,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c ...@@ -473,12 +473,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 ); mouse_event( MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 ); mouse_event( MOUSEEVENTF_LEFTUP, 0, 0, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
} }
...@@ -494,21 +494,21 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c ...@@ -494,21 +494,21 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c
if (type == INPUT_KEYBOARD) if (type == INPUT_KEYBOARD)
{ {
keybd_event( VK_SPACE, DIK_SPACE, 0, 0 ); keybd_event( VK_SPACE, DIK_SPACE, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
keybd_event( VK_SPACE, DIK_SPACE, KEYEVENTF_KEYUP, 0 ); keybd_event( VK_SPACE, DIK_SPACE, KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
} }
if (type == INPUT_MOUSE) if (type == INPUT_MOUSE)
{ {
mouse_event( MOUSEEVENTF_LEFTDOWN, 1, 1, 0, 0 ); mouse_event( MOUSEEVENTF_LEFTDOWN, 1, 1, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
mouse_event( MOUSEEVENTF_LEFTUP, 1, 1, 0, 0 ); mouse_event( MOUSEEVENTF_LEFTUP, 1, 1, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
} }
} }
...@@ -1467,7 +1467,7 @@ static void test_sys_mouse( DWORD version ) ...@@ -1467,7 +1467,7 @@ static void test_sys_mouse( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 ); mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
...@@ -1477,7 +1477,7 @@ static void test_sys_mouse( DWORD version ) ...@@ -1477,7 +1477,7 @@ static void test_sys_mouse( DWORD version )
ok( count == 1, "got count %lu\n", count ); ok( count == 1, "got count %lu\n", count );
mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 ); mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
hr = IDirectInputDevice8_Unacquire( device ); hr = IDirectInputDevice8_Unacquire( device );
...@@ -1496,7 +1496,7 @@ static void test_sys_mouse( DWORD version ) ...@@ -1496,7 +1496,7 @@ static void test_sys_mouse( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 ); mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
...@@ -1517,14 +1517,14 @@ static void test_sys_mouse( DWORD version ) ...@@ -1517,14 +1517,14 @@ static void test_sys_mouse( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 ); mouse_event( MOUSEEVENTF_MOVE, 10, 10, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
for (i = 0; i < 2; i++) for (i = 0; i < 2; i++)
{ {
mouse_event( MOUSEEVENTF_MOVE, 10 + i, 10 + i, 0, 0 ); mouse_event( MOUSEEVENTF_MOVE, 10 + i, 10 + i, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
} }
...@@ -1660,7 +1660,7 @@ static void test_dik_codes( IDirectInputDevice8W *device, HANDLE event, HWND hwn ...@@ -1660,7 +1660,7 @@ static void test_dik_codes( IDirectInputDevice8W *device, HANDLE event, HWND hwn
if (i == 0 && j == 0 && res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (i == 0 && j == 0 && res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
keybd_event( vkey, scan, 0, 0 ); keybd_event( vkey, scan, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
...@@ -1671,7 +1671,7 @@ static void test_dik_codes( IDirectInputDevice8W *device, HANDLE event, HWND hwn ...@@ -1671,7 +1671,7 @@ static void test_dik_codes( IDirectInputDevice8W *device, HANDLE event, HWND hwn
ok( key_state[map[j].dik] == 0x80, "got state %#x\n", key_state[map[j].dik] ); ok( key_state[map[j].dik] == 0x80, "got state %#x\n", key_state[map[j].dik] );
keybd_event( vkey, scan, KEYEVENTF_KEYUP, 0 ); keybd_event( vkey, scan, KEYEVENTF_KEYUP, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
winetest_pop_context(); winetest_pop_context();
...@@ -2150,7 +2150,7 @@ static void test_sys_keyboard( DWORD version ) ...@@ -2150,7 +2150,7 @@ static void test_sys_keyboard( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
keybd_event( 'Q', 0, 0, 0 ); keybd_event( 'Q', 0, 0, 0 );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( !res, "WaitForSingleObject returned %#lx\n", res ); ok( !res, "WaitForSingleObject returned %#lx\n", res );
......
...@@ -4175,7 +4175,7 @@ static void test_device_managed_effect(void) ...@@ -4175,7 +4175,7 @@ static void test_device_managed_effect(void)
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 100 );
ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_TIMEOUT, "WaitForSingleObject returned %#lx\n", res );
send_hid_input( file, device_state_input, sizeof(device_state_input) ); send_hid_input( file, device_state_input, sizeof(device_state_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
...@@ -4383,7 +4383,7 @@ static void test_device_managed_effect(void) ...@@ -4383,7 +4383,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, NULL, 0 ); set_hid_expect( file, NULL, 0 );
send_hid_input( file, device_state_input_0, sizeof(device_state_input_0) ); send_hid_input( file, device_state_input_0, sizeof(device_state_input_0) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
set_hid_expect( file, expect_pool, sizeof(struct hid_expect) ); set_hid_expect( file, expect_pool, sizeof(struct hid_expect) );
res = 0xdeadbeef; res = 0xdeadbeef;
...@@ -4394,7 +4394,7 @@ static void test_device_managed_effect(void) ...@@ -4394,7 +4394,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, NULL, 0 ); set_hid_expect( file, NULL, 0 );
send_hid_input( file, device_state_input_1, sizeof(device_state_input_1) ); send_hid_input( file, device_state_input_1, sizeof(device_state_input_1) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
res = 0xdeadbeef; res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res ); hr = IDirectInputEffect_GetEffectStatus( effect, &res );
...@@ -4409,7 +4409,7 @@ static void test_device_managed_effect(void) ...@@ -4409,7 +4409,7 @@ static void test_device_managed_effect(void)
set_hid_expect( file, NULL, 0 ); set_hid_expect( file, NULL, 0 );
send_hid_input( file, device_state_input_2, sizeof(device_state_input_2) ); send_hid_input( file, device_state_input_2, sizeof(device_state_input_2) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject returned %#lx\n", res );
res = 0xdeadbeef; res = 0xdeadbeef;
hr = IDirectInputEffect_GetEffectStatus( effect, &res ); hr = IDirectInputEffect_GetEffectStatus( effect, &res );
......
...@@ -2186,7 +2186,7 @@ static void test_simple_joystick( DWORD version ) ...@@ -2186,7 +2186,7 @@ static void test_simple_joystick( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
send_hid_input( file, &injected_input[0], sizeof(*injected_input) ); send_hid_input( file, &injected_input[0], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2217,7 +2217,7 @@ static void test_simple_joystick( DWORD version ) ...@@ -2217,7 +2217,7 @@ static void test_simple_joystick( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
send_hid_input( file, &injected_input[1], sizeof(*injected_input) ); send_hid_input( file, &injected_input[1], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2244,11 +2244,11 @@ static void test_simple_joystick( DWORD version ) ...@@ -2244,11 +2244,11 @@ static void test_simple_joystick( DWORD version )
} }
send_hid_input( file, &injected_input[2], sizeof(*injected_input) ); send_hid_input( file, &injected_input[2], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
send_hid_input( file, &injected_input[4], sizeof(*injected_input) ); send_hid_input( file, &injected_input[4], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2279,7 +2279,7 @@ static void test_simple_joystick( DWORD version ) ...@@ -2279,7 +2279,7 @@ static void test_simple_joystick( DWORD version )
} }
send_hid_input( file, &injected_input[3], sizeof(*injected_input) ); send_hid_input( file, &injected_input[3], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2426,7 +2426,7 @@ static void test_simple_joystick( DWORD version ) ...@@ -2426,7 +2426,7 @@ static void test_simple_joystick( DWORD version )
ResetEvent( event ); ResetEvent( event );
send_hid_input( file, &injected_input[3], sizeof(*injected_input) ); send_hid_input( file, &injected_input[3], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2452,13 +2452,13 @@ static void test_simple_joystick( DWORD version ) ...@@ -2452,13 +2452,13 @@ static void test_simple_joystick( DWORD version )
if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */ if (res == WAIT_TIMEOUT) /* Acquire is asynchronous */
{ {
send_hid_input( file, &injected_input[4], sizeof(*injected_input) ); send_hid_input( file, &injected_input[4], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
} }
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
send_hid_input( file, &injected_input[3], sizeof(*injected_input) ); send_hid_input( file, &injected_input[3], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
ResetEvent( event ); ResetEvent( event );
...@@ -2722,7 +2722,7 @@ static void test_simple_joystick( DWORD version ) ...@@ -2722,7 +2722,7 @@ static void test_simple_joystick( DWORD version )
ok( hr == DI_OK, "SetProperty DIPROP_CALIBRATIONMODE returned %#lx\n", hr ); ok( hr == DI_OK, "SetProperty DIPROP_CALIBRATIONMODE returned %#lx\n", hr );
send_hid_input( file, &injected_input[ARRAY_SIZE(injected_input) - 1], sizeof(*injected_input) ); send_hid_input( file, &injected_input[ARRAY_SIZE(injected_input) - 1], sizeof(*injected_input) );
res = WaitForSingleObject( event, 100 ); res = WaitForSingleObject( event, 5000 );
ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" ); ok( res == WAIT_OBJECT_0, "WaitForSingleObject failed\n" );
hr = IDirectInputDevice8_Unacquire( device ); hr = IDirectInputDevice8_Unacquire( device );
...@@ -4523,8 +4523,8 @@ static BOOL test_winmm_joystick(void) ...@@ -4523,8 +4523,8 @@ static BOOL test_winmm_joystick(void)
ok( hr == DI_OK, "Acquire returned: %#lx\n", hr ); ok( hr == DI_OK, "Acquire returned: %#lx\n", hr );
send_hid_input( file, &injected_input[0], sizeof(struct hid_expect) ); send_hid_input( file, &injected_input[0], sizeof(struct hid_expect) );
ret = WaitForSingleObject( event, 100 ); ret = WaitForSingleObject( event, 5000 );
ok( ret != WAIT_TIMEOUT, "WaitForSingleObject returned %#x\n", ret ); ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", ret );
Sleep( 50 ); /* leave some time for winmm to keep up */ Sleep( 50 ); /* leave some time for winmm to keep up */
memset( &infoex, 0xcd, sizeof(infoex) ); memset( &infoex, 0xcd, sizeof(infoex) );
...@@ -4545,8 +4545,8 @@ static BOOL test_winmm_joystick(void) ...@@ -4545,8 +4545,8 @@ static BOOL test_winmm_joystick(void)
check_member( infoex, expect_infoex[1], "%#lx", dwPOV ); check_member( infoex, expect_infoex[1], "%#lx", dwPOV );
send_hid_input( file, &injected_input[1], sizeof(struct hid_expect) ); send_hid_input( file, &injected_input[1], sizeof(struct hid_expect) );
ret = WaitForSingleObject( event, 100 ); ret = WaitForSingleObject( event, 5000 );
ok( ret != WAIT_TIMEOUT, "WaitForSingleObject returned %#x\n", ret ); ok( ret == WAIT_OBJECT_0, "WaitForSingleObject returned %#x\n", ret );
Sleep( 50 ); /* leave some time for winmm to keep up */ Sleep( 50 ); /* leave some time for winmm to keep up */
memset( &infoex, 0xcd, sizeof(infoex) ); memset( &infoex, 0xcd, sizeof(infoex) );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment