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
02f9306f
Commit
02f9306f
authored
Oct 06, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 06, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput8/tests: Add Y and Z axes as force-feedback capable axes.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7255718b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
75 additions
and
35 deletions
+75
-35
hid.c
dlls/dinput8/tests/hid.c
+75
-35
No files found.
dlls/dinput8/tests/hid.c
View file @
02f9306f
...
...
@@ -5360,12 +5360,13 @@ static void test_force_feedback_joystick( void )
USAGE
(
1
,
HID_USAGE_GENERIC_X
),
USAGE
(
1
,
HID_USAGE_GENERIC_Y
),
USAGE
(
1
,
HID_USAGE_GENERIC_Z
),
LOGICAL_MINIMUM
(
1
,
0
),
LOGICAL_MAXIMUM
(
1
,
0x7f
),
PHYSICAL_MINIMUM
(
1
,
0
),
PHYSICAL_MAXIMUM
(
1
,
0x7f
),
REPORT_SIZE
(
1
,
8
),
REPORT_COUNT
(
1
,
2
),
REPORT_COUNT
(
1
,
3
),
INPUT
(
1
,
Data
|
Var
|
Abs
),
USAGE_PAGE
(
1
,
HID_USAGE_PAGE_BUTTON
),
...
...
@@ -5472,18 +5473,20 @@ static void test_force_feedback_joystick( void )
USAGE
(
1
,
PID_USAGE_AXES_ENABLE
),
COLLECTION
(
1
,
Logical
),
USAGE
(
4
,
(
HID_USAGE_PAGE_GENERIC
<<
16
)
|
HID_USAGE_GENERIC_X
),
USAGE
(
4
,
(
HID_USAGE_PAGE_GENERIC
<<
16
)
|
HID_USAGE_GENERIC_Y
),
USAGE
(
4
,
(
HID_USAGE_PAGE_GENERIC
<<
16
)
|
HID_USAGE_GENERIC_Z
),
LOGICAL_MINIMUM
(
1
,
0
),
LOGICAL_MAXIMUM
(
1
,
1
),
PHYSICAL_MINIMUM
(
1
,
0
),
PHYSICAL_MAXIMUM
(
1
,
1
),
REPORT_SIZE
(
1
,
1
),
REPORT_COUNT
(
1
,
1
),
REPORT_COUNT
(
1
,
3
),
OUTPUT
(
1
,
Data
|
Var
|
Abs
),
END_COLLECTION
,
USAGE
(
1
,
PID_USAGE_DIRECTION_ENABLE
),
REPORT_COUNT
(
1
,
1
),
OUTPUT
(
1
,
Data
|
Var
|
Abs
),
REPORT_COUNT
(
1
,
6
),
REPORT_COUNT
(
1
,
4
),
OUTPUT
(
1
,
Cnst
|
Var
|
Abs
),
END_COLLECTION
,
...
...
@@ -5507,14 +5510,14 @@ static void test_force_feedback_joystick( void )
static
const
HIDP_CAPS
hid_caps
=
{
.
InputReportByteLength
=
4
,
.
InputReportByteLength
=
5
,
};
static
const
DIDEVCAPS
expect_caps
=
{
.
dwSize
=
sizeof
(
DIDEVCAPS
),
.
dwFlags
=
DIDC_FORCEFEEDBACK
|
DIDC_ATTACHED
|
DIDC_EMULATED
,
.
dwDevType
=
DIDEVTYPE_HID
|
(
DI8DEVTYPEJOYSTICK_LIMITED
<<
8
)
|
DI8DEVTYPE_JOYSTICK
,
.
dwAxes
=
2
,
.
dwAxes
=
3
,
.
dwButtons
=
2
,
.
dwFFSamplePeriod
=
1000000
,
.
dwFFMinTimeResolution
=
1000000
,
...
...
@@ -5545,9 +5548,21 @@ static void test_force_feedback_joystick( void )
{
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_ZAxis
,
.
dwType
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
2
)
|
DIDFT_FFACTUATOR
,
.
dwFlags
=
DIDOI_ASPECTPOSITION
|
DIDOI_FFACTUATOR
,
.
tszName
=
L"Z Axis"
,
.
wCollectionNumber
=
1
,
.
wUsagePage
=
HID_USAGE_PAGE_GENERIC
,
.
wUsage
=
HID_USAGE_GENERIC_Z
,
.
wReportId
=
1
,
},
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_YAxis
,
.
dwType
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
1
),
.
dwFlags
=
DIDOI_ASPECTPOSITION
,
.
dwOfs
=
0x4
,
.
dwType
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
1
)
|
DIDFT_FFACTUATOR
,
.
dwFlags
=
DIDOI_ASPECTPOSITION
|
DIDOI_FFACTUATOR
,
.
tszName
=
L"Y Axis"
,
.
wCollectionNumber
=
1
,
.
wUsagePage
=
HID_USAGE_PAGE_GENERIC
,
...
...
@@ -5557,7 +5572,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_XAxis
,
.
dwOfs
=
0x
4
,
.
dwOfs
=
0x
8
,
.
dwType
=
DIDFT_ABSAXIS
|
DIDFT_MAKEINSTANCE
(
0
)
|
DIDFT_FFACTUATOR
,
.
dwFlags
=
DIDOI_ASPECTPOSITION
|
DIDOI_FFACTUATOR
,
.
tszName
=
L"X Axis"
,
...
...
@@ -5569,7 +5584,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Button
,
.
dwOfs
=
0x1
8
,
.
dwOfs
=
0x1
c
,
.
dwType
=
DIDFT_PSHBUTTON
|
DIDFT_MAKEINSTANCE
(
0
)
|
DIDFT_FFEFFECTTRIGGER
,
.
dwFlags
=
DIDOI_FFEFFECTTRIGGER
,
.
tszName
=
L"Button 0"
,
...
...
@@ -5581,7 +5596,7 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Button
,
.
dwOfs
=
0x1
9
,
.
dwOfs
=
0x1
d
,
.
dwType
=
DIDFT_PSHBUTTON
|
DIDFT_MAKEINSTANCE
(
1
)
|
DIDFT_FFEFFECTTRIGGER
,
.
dwFlags
=
DIDOI_FFEFFECTTRIGGER
,
.
tszName
=
L"Button 1"
,
...
...
@@ -5593,8 +5608,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
a
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
4
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x1
e
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
5
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"DC Device Reset"
,
.
wCollectionNumber
=
4
,
...
...
@@ -5605,8 +5620,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
8
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
5
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
c
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
6
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Effect Block Index"
,
.
wCollectionNumber
=
5
,
...
...
@@ -5617,8 +5632,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
b
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
6
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x1
f
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
7
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Start"
,
.
wCollectionNumber
=
6
,
...
...
@@ -5629,8 +5644,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
1c
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
7
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
20
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
8
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Start Solo"
,
.
wCollectionNumber
=
6
,
...
...
@@ -5641,8 +5656,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
1d
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
8
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
21
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
9
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Op Effect Stop"
,
.
wCollectionNumber
=
6
,
...
...
@@ -5653,8 +5668,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
c
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
9
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
10
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
10
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Loop Count"
,
.
wCollectionNumber
=
5
,
...
...
@@ -5665,8 +5680,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
0
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
0
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x1
4
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
1
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Effect Block Index"
,
.
wCollectionNumber
=
7
,
...
...
@@ -5677,8 +5692,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
1e
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
1
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
22
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
2
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"ET Square"
,
.
wCollectionNumber
=
8
,
...
...
@@ -5689,8 +5704,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x
1f
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
2
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x
23
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
3
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"ET Sine"
,
.
wCollectionNumber
=
8
,
...
...
@@ -5701,8 +5716,32 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x20
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
13
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x24
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
14
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Z Axis"
,
.
wCollectionNumber
=
9
,
.
wUsagePage
=
HID_USAGE_PAGE_GENERIC
,
.
wUsage
=
HID_USAGE_GENERIC_Z
,
.
wReportId
=
3
,
},
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x25
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
15
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Y Axis"
,
.
wCollectionNumber
=
9
,
.
wUsagePage
=
HID_USAGE_PAGE_GENERIC
,
.
wUsage
=
HID_USAGE_GENERIC_Y
,
.
wReportId
=
3
,
},
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x26
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
16
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"X Axis"
,
.
wCollectionNumber
=
9
,
...
...
@@ -5713,8 +5752,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x2
1
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
4
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x2
7
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
7
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Direction Enable"
,
.
wCollectionNumber
=
7
,
...
...
@@ -5725,8 +5764,8 @@ static void test_force_feedback_joystick( void )
{
.
dwSize
=
sizeof
(
DIDEVICEOBJECTINSTANCEW
),
.
guidType
=
GUID_Unknown
,
.
dwOfs
=
0x1
4
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
5
)
|
DIDFT_OUTPUT
,
.
dwOfs
=
0x1
8
,
.
dwType
=
DIDFT_NODATA
|
DIDFT_MAKEINSTANCE
(
1
8
)
|
DIDFT_OUTPUT
,
.
dwFlags
=
0x80008000
,
.
tszName
=
L"Magnitude"
,
.
wCollectionNumber
=
10
,
...
...
@@ -5829,7 +5868,8 @@ static void test_force_feedback_joystick( void )
};
const
struct
check_objects_todos
objects_todos
[
ARRAY_SIZE
(
expect_objects
)]
=
{
{},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
{.
type
=
TRUE
,
.
flags
=
TRUE
},
...
...
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