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
453940f5
Commit
453940f5
authored
Oct 07, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Look for PID direction collection and set DIEP_DIRECTION if found.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
83bc89f4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
0 deletions
+12
-0
joystick_hid.c
dlls/dinput/joystick_hid.c
+12
-0
No files found.
dlls/dinput/joystick_hid.c
View file @
453940f5
...
...
@@ -92,7 +92,10 @@ struct pid_effect_update
ULONG
type_coll
;
ULONG
axes_coll
;
ULONG
axis_count
;
ULONG
direction_coll
;
ULONG
direction_count
;
struct
hid_value_caps
*
axis_caps
[
6
];
struct
hid_value_caps
*
direction_caps
[
6
];
struct
hid_value_caps
*
duration_caps
;
struct
hid_value_caps
*
gain_caps
;
struct
hid_value_caps
*
sample_period_caps
;
...
...
@@ -1138,6 +1141,7 @@ static HRESULT WINAPI hid_joystick_GetEffectInfo( IDirectInputDevice8W *iface, D
}
if
(
effect_update
->
trigger_button_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERBUTTON
;
if
(
effect_update
->
trigger_repeat_interval_caps
)
info
->
dwDynamicParams
|=
DIEP_TRIGGERREPEATINTERVAL
;
if
(
effect_update
->
direction_coll
)
info
->
dwDynamicParams
|=
DIEP_DIRECTION
;
if
(
effect_update
->
axes_coll
)
info
->
dwDynamicParams
|=
DIEP_AXES
;
if
(
!
(
collection
=
effect_update
->
type_coll
))
return
DIERR_DEVICENOTREG
;
...
...
@@ -1831,6 +1835,7 @@ static BOOL init_pid_reports( struct hid_joystick *impl, struct hid_value_caps *
SET_SUB_COLLECTION
(
effect_update
,
type_coll
);
break
;
case
PID_USAGE_AXES_ENABLE
:
SET_SUB_COLLECTION
(
effect_update
,
axes_coll
);
break
;
case
PID_USAGE_DIRECTION
:
SET_SUB_COLLECTION
(
effect_update
,
direction_coll
);
break
;
}
}
...
...
@@ -1887,6 +1892,13 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap
else
effect_update
->
axis_caps
[
effect_update
->
axis_count
]
=
caps
;
effect_update
->
axis_count
++
;
}
if
(
instance
->
wCollectionNumber
==
effect_update
->
direction_coll
)
{
SET_REPORT_ID
(
effect_update
);
if
(
effect_update
->
direction_count
>=
6
)
FIXME
(
"more than 6 PID directions detected
\n
"
);
else
effect_update
->
direction_caps
[
effect_update
->
direction_count
]
=
caps
;
effect_update
->
direction_count
++
;
}
#undef SET_REPORT_ID
...
...
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