Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
6d7e5c71
Commit
6d7e5c71
authored
Sep 30, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Sep 30, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Add the required PID reports to create effects.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f9bb8f98
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
53 additions
and
11 deletions
+53
-11
driver_hid.c
dlls/dinput8/tests/driver_hid.c
+5
-0
hid.c
dlls/dinput8/tests/hid.c
+48
-11
No files found.
dlls/dinput8/tests/driver_hid.c
View file @
6d7e5c71
...
...
@@ -144,6 +144,11 @@ static void expect_queue_next( struct expect_queue *queue, ULONG code, HID_XFER_
ok
(
tmp
!=
&
queue
->
spurious
,
"got spurious packet
\n
"
);
winetest_push_context
(
"%s expect[%d]"
,
tmp
->
context
,
tmp
-
queue
->
buffer
);
todo_wine_if
(
tmp
->
todo
)
ok
(
1
,
"found code %#x id %u len %u
\n
"
,
tmp
->
code
,
tmp
->
report_id
,
tmp
->
report_len
);
winetest_pop_context
();
tmp
=
missing
;
while
(
tmp
!=
missing_end
)
{
...
...
dlls/dinput8/tests/hid.c
View file @
6d7e5c71
...
...
@@ -5189,6 +5189,20 @@ static void test_force_feedback_joystick( void )
REPORT_COUNT
(
1
,
6
),
OUTPUT
(
1
,
Cnst
|
Var
|
Abs
),
END_COLLECTION
,
USAGE
(
1
,
PID_USAGE_SET_PERIODIC_REPORT
),
COLLECTION
(
1
,
Logical
),
REPORT_ID
(
1
,
5
),
USAGE
(
1
,
PID_USAGE_MAGNITUDE
),
LOGICAL_MINIMUM
(
1
,
0
),
LOGICAL_MAXIMUM
(
2
,
0x00ff
),
PHYSICAL_MINIMUM
(
1
,
0
),
PHYSICAL_MAXIMUM
(
2
,
0x2710
),
REPORT_SIZE
(
1
,
8
),
REPORT_COUNT
(
1
,
1
),
OUTPUT
(
1
,
Data
|
Var
|
Abs
),
END_COLLECTION
,
END_COLLECTION
,
};
#undef REPORT_ID_OR_USAGE_PAGE
...
...
@@ -5259,7 +5273,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Button
,
.
dwOfs
=
0x1
4
,
.
dwOfs
=
0x1
8
,
.
dwType
=
DIDFT_PSHBUTTON
|
DIDFT_MAKEINSTANCE
(
0
)
|
DIDFT_FFEFFECTTRIGGER
,
.
dwFlags
=
DIDOI_FFEFFECTTRIGGER
,
.
tszName
=
L"Button 0"
,
...
...
@@ -5271,7 +5285,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Button
,
.
dwOfs
=
0x1
5
,
.
dwOfs
=
0x1
9
,
.
dwType
=
DIDFT_PSHBUTTON
|
DIDFT_MAKEINSTANCE
(
1
)
|
DIDFT_FFEFFECTTRIGGER
,
.
dwFlags
=
DIDOI_FFEFFECTTRIGGER
,
.
tszName
=
L"Button 1"
,
...
...
@@ -5283,7 +5297,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
6
,
.
dwOfs
=
0x1
a
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
4
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"DC Device Reset"
,
...
...
@@ -5307,7 +5321,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
7
,
.
dwOfs
=
0x1
b
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
6
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Start"
,
...
...
@@ -5319,7 +5333,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
8
,
.
dwOfs
=
0x1
c
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
7
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Start Solo"
,
...
...
@@ -5331,7 +5345,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
9
,
.
dwOfs
=
0x1
d
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
8
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Stop"
,
...
...
@@ -5367,7 +5381,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
a
,
.
dwOfs
=
0x1
e
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
11
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"ET Sine"
,
...
...
@@ -5379,7 +5393,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
b
,
.
dwOfs
=
0x1
f
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
12
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"X Axis"
,
...
...
@@ -5391,7 +5405,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
1c
,
.
dwOfs
=
0x
20
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
13
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Direction Enable"
,
...
...
@@ -5403,6 +5417,18 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x14
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
14
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Magnitude"
,
.
wCollectionNumber
=
10
,
.
wUsagePage
=
HID_USAGE_PAGE_PID
,
.
wUsage
=
PID_USAGE_MAGNITUDE
,
.
wReportId
=
5
,
},
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwType
=
DIDFT_COLLECTION
|
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
0
),
.
tszName
=
L"Collection 0 - Joystick"
,
.
wUsagePage
=
HID_USAGE_PAGE_GENERIC
,
...
...
@@ -5484,6 +5510,14 @@ static void test_force_feedback_joystick( void )
.
wUsagePage
=
HID_USAGE_PAGE_PID
,
.
wUsage
=
PID_USAGE_AXES_ENABLE
,
},
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwType
=
DIDFT_COLLECTION
|
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
10
),
.
tszName
=
L"Collection 10 - Set Periodic Report"
,
.
wUsagePage
=
HID_USAGE_PAGE_PID
,
.
wUsage
=
PID_USAGE_SET_PERIODIC_REPORT
,
},
};
const
struct
check_objects_todos
objects_todos
[
ARRAY_SIZE
(
expect_objects
)]
=
{
...
...
@@ -5497,6 +5531,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIEFFECTINFOW
),
.
guid
=
GUID_Sine
,
.
dwEffType
=
DIEFT_PERIODIC
,
.
dwStaticParams
=
DIEP_AXES
|
DIEP_TYPESPECIFICPARAMS
,
.
dwDynamicParams
=
DIEP_AXES
|
DIEP_TYPESPECIFICPARAMS
,
.
tszName
=
L"GUID_Sine"
,
...
...
@@ -5631,7 +5666,8 @@ static void test_force_feedback_joystick( void )
res
=
0
;
hr
=
IDirectInputDevice8_EnumEffects
(
device
,
check_effect_count
,
&
res
,
DIEFT_PERIODIC
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_EnumEffects returned %#x
\n
"
,
hr
);
ok
(
res
==
0
,
"got %u expected %u
\n
"
,
res
,
0
);
todo_wine
ok
(
res
==
1
,
"got %u expected %u
\n
"
,
res
,
1
);
hr
=
IDirectInputDevice8_EnumEffects
(
device
,
check_effects
,
&
check_effects_params
,
DIEFT_ALL
);
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_EnumEffects returned %#x
\n
"
,
hr
);
todo_wine
...
...
@@ -5643,6 +5679,7 @@ static void test_force_feedback_joystick( void )
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
todo_wine
check_member_guid
(
effectinfo
,
expect_effects
[
0
],
guid
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwEffType
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwStaticParams
);
...
...
@@ -5753,7 +5790,7 @@ static void test_force_feedback_joystick( void )
todo_wine
ok
(
hr
==
HIDP_STATUS_USAGE_NOT_FOUND
,
"IDirectInputDevice8_SendForceFeedbackCommand returned %#x
\n
"
,
hr
);
objdata
.
dwOfs
=
0x1
6
;
objdata
.
dwOfs
=
0x1
e
;
objdata
.
dwData
=
0x80
;
res
=
1
;
hr
=
IDirectInputDevice8_SendDeviceData
(
device
,
sizeof
(
DIDEVICEOBJECTDATA
),
&
objdata
,
&
res
,
0
);
...
...
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