Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
65952526
Commit
65952526
authored
Mar 15, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 16, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput/tests: Increase timeouts for waits not supposed to fail.
Wine-Bug:
https://bugs.winehq.org/show_bug.cgi?id=54594
parent
07753da9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
41 deletions
+41
-41
device8.c
dlls/dinput/tests/device8.c
+24
-24
force_feedback.c
dlls/dinput/tests/force_feedback.c
+4
-4
joystick8.c
dlls/dinput/tests/joystick8.c
+13
-13
No files found.
dlls/dinput/tests/device8.c
View file @
65952526
...
...
@@ -316,12 +316,12 @@ void test_overlapped_format( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
keybd_event
(
0
,
DIK_F
,
KEYEVENTF_SCANCODE
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
keybd_event
(
0
,
DIK_F
,
KEYEVENTF_SCANCODE
|
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -332,7 +332,7 @@ void test_overlapped_format( DWORD version )
/* press D */
keybd_event
(
0
,
DIK_D
,
KEYEVENTF_SCANCODE
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -352,7 +352,7 @@ void test_overlapped_format( DWORD version )
/* release D */
keybd_event
(
0
,
DIK_D
,
KEYEVENTF_SCANCODE
|
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -378,12 +378,12 @@ void test_overlapped_format( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
keybd_event
(
0
,
DIK_F
,
KEYEVENTF_SCANCODE
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
keybd_event
(
0
,
DIK_F
,
KEYEVENTF_SCANCODE
|
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -394,7 +394,7 @@ void test_overlapped_format( DWORD version )
/* press D */
keybd_event
(
0
,
DIK_D
,
KEYEVENTF_SCANCODE
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -414,7 +414,7 @@ void test_overlapped_format( DWORD version )
/* release D */
keybd_event
(
0
,
DIK_D
,
KEYEVENTF_SCANCODE
|
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
count
=
10
;
...
...
@@ -458,12 +458,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
keybd_event
(
0
,
code
,
KEYEVENTF_SCANCODE
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
keybd_event
(
0
,
code
,
KEYEVENTF_SCANCODE
|
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
}
if
(
type
==
INPUT_MOUSE
)
...
...
@@ -473,12 +473,12 @@ static void test_device_input( IDirectInputDevice8A *device, DWORD type, DWORD c
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
0
,
0
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
0
,
0
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
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
if
(
type
==
INPUT_KEYBOARD
)
{
keybd_event
(
VK_SPACE
,
DIK_SPACE
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
keybd_event
(
VK_SPACE
,
DIK_SPACE
,
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
}
if
(
type
==
INPUT_MOUSE
)
{
mouse_event
(
MOUSEEVENTF_LEFTDOWN
,
1
,
1
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
mouse_event
(
MOUSEEVENTF_LEFTUP
,
1
,
1
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
}
}
...
...
@@ -1467,7 +1467,7 @@ static void test_sys_mouse( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
mouse_event
(
MOUSEEVENTF_MOVE
,
10
,
10
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
@@ -1477,7 +1477,7 @@ static void test_sys_mouse( DWORD version )
ok
(
count
==
1
,
"got count %lu
\n
"
,
count
);
mouse_event
(
MOUSEEVENTF_MOVE
,
10
,
10
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
...
...
@@ -1496,7 +1496,7 @@ static void test_sys_mouse( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
mouse_event
(
MOUSEEVENTF_MOVE
,
10
,
10
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
@@ -1517,14 +1517,14 @@ static void test_sys_mouse( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
mouse_event
(
MOUSEEVENTF_MOVE
,
10
,
10
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
for
(
i
=
0
;
i
<
2
;
i
++
)
{
mouse_event
(
MOUSEEVENTF_MOVE
,
10
+
i
,
10
+
i
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
}
...
...
@@ -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 */
{
keybd_event
(
vkey
,
scan
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
@@ -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
]
);
keybd_event
(
vkey
,
scan
,
KEYEVENTF_KEYUP
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
winetest_pop_context
();
...
...
@@ -2150,7 +2150,7 @@ static void test_sys_keyboard( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
keybd_event
(
'Q'
,
0
,
0
,
0
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
!
res
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
...
...
dlls/dinput/tests/force_feedback.c
View file @
65952526
...
...
@@ -4175,7 +4175,7 @@ static void test_device_managed_effect(void)
res
=
WaitForSingleObject
(
event
,
100
);
ok
(
res
==
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
send_hid_input
(
file
,
device_state_input
,
sizeof
(
device_state_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
set_hid_expect
(
file
,
expect_pool
,
sizeof
(
struct
hid_expect
)
);
...
...
@@ -4383,7 +4383,7 @@ static void test_device_managed_effect(void)
set_hid_expect
(
file
,
NULL
,
0
);
send_hid_input
(
file
,
device_state_input_0
,
sizeof
(
device_state_input_0
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
set_hid_expect
(
file
,
expect_pool
,
sizeof
(
struct
hid_expect
)
);
res
=
0xdeadbeef
;
...
...
@@ -4394,7 +4394,7 @@ static void test_device_managed_effect(void)
set_hid_expect
(
file
,
NULL
,
0
);
send_hid_input
(
file
,
device_state_input_1
,
sizeof
(
device_state_input_1
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
0xdeadbeef
;
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
res
);
...
...
@@ -4409,7 +4409,7 @@ static void test_device_managed_effect(void)
set_hid_expect
(
file
,
NULL
,
0
);
send_hid_input
(
file
,
device_state_input_2
,
sizeof
(
device_state_input_2
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#lx
\n
"
,
res
);
res
=
0xdeadbeef
;
hr
=
IDirectInputEffect_GetEffectStatus
(
effect
,
&
res
);
...
...
dlls/dinput/tests/joystick8.c
View file @
65952526
...
...
@@ -2186,7 +2186,7 @@ static void test_simple_joystick( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
send_hid_input
(
file
,
&
injected_input
[
0
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2217,7 +2217,7 @@ static void test_simple_joystick( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
send_hid_input
(
file
,
&
injected_input
[
1
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2244,11 +2244,11 @@ static void test_simple_joystick( DWORD version )
}
send_hid_input
(
file
,
&
injected_input
[
2
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
send_hid_input
(
file
,
&
injected_input
[
4
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2279,7 +2279,7 @@ static void test_simple_joystick( DWORD version )
}
send_hid_input
(
file
,
&
injected_input
[
3
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2426,7 +2426,7 @@ static void test_simple_joystick( DWORD version )
ResetEvent
(
event
);
send_hid_input
(
file
,
&
injected_input
[
3
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2452,13 +2452,13 @@ static void test_simple_joystick( DWORD version )
if
(
res
==
WAIT_TIMEOUT
)
/* Acquire is asynchronous */
{
send_hid_input
(
file
,
&
injected_input
[
4
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
}
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
send_hid_input
(
file
,
&
injected_input
[
3
],
sizeof
(
*
injected_input
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
ResetEvent
(
event
);
...
...
@@ -2722,7 +2722,7 @@ static void test_simple_joystick( DWORD version )
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
)
);
res
=
WaitForSingleObject
(
event
,
1
00
);
res
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
res
==
WAIT_OBJECT_0
,
"WaitForSingleObject failed
\n
"
);
hr
=
IDirectInputDevice8_Unacquire
(
device
);
...
...
@@ -4523,8 +4523,8 @@ static BOOL test_winmm_joystick(void)
ok
(
hr
==
DI_OK
,
"Acquire returned: %#lx
\n
"
,
hr
);
send_hid_input
(
file
,
&
injected_input
[
0
],
sizeof
(
struct
hid_expect
)
);
ret
=
WaitForSingleObject
(
event
,
1
00
);
ok
(
ret
!=
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#x
\n
"
,
ret
);
ret
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#x
\n
"
,
ret
);
Sleep
(
50
);
/* leave some time for winmm to keep up */
memset
(
&
infoex
,
0xcd
,
sizeof
(
infoex
)
);
...
...
@@ -4545,8 +4545,8 @@ static BOOL test_winmm_joystick(void)
check_member
(
infoex
,
expect_infoex
[
1
],
"%#lx"
,
dwPOV
);
send_hid_input
(
file
,
&
injected_input
[
1
],
sizeof
(
struct
hid_expect
)
);
ret
=
WaitForSingleObject
(
event
,
1
00
);
ok
(
ret
!=
WAIT_TIMEOUT
,
"WaitForSingleObject returned %#x
\n
"
,
ret
);
ret
=
WaitForSingleObject
(
event
,
50
00
);
ok
(
ret
==
WAIT_OBJECT_0
,
"WaitForSingleObject returned %#x
\n
"
,
ret
);
Sleep
(
50
);
/* leave some time for winmm to keep up */
memset
(
&
infoex
,
0xcd
,
sizeof
(
infoex
)
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment