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
b725ccbd
Commit
b725ccbd
authored
Oct 05, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Oct 05, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Look for PID axes enable collection and set DIEP_AXES if found.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
994fd9f7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
joystick_hid.c
dlls/dinput/joystick_hid.c
+14
-0
hid.c
dlls/dinput8/tests/hid.c
+0
-4
No files found.
dlls/dinput/joystick_hid.c
View file @
b725ccbd
...
...
@@ -90,6 +90,9 @@ struct pid_effect_update
BYTE
id
;
ULONG
collection
;
ULONG
type_coll
;
ULONG
axes_coll
;
ULONG
axis_count
;
struct
hid_value_caps
*
axis_caps
[
6
];
struct
hid_value_caps
*
duration_caps
;
struct
hid_value_caps
*
gain_caps
;
struct
hid_value_caps
*
sample_period_caps
;
...
...
@@ -1055,6 +1058,8 @@ static HRESULT WINAPI hid_joystick_GetEffectInfo( IDirectInputDevice8W *iface, D
if
(
!
(
collection
=
effect_update
->
collection
))
return
DIERR_DEVICENOTREG
;
info
->
dwDynamicParams
=
DIEP_TYPESPECIFICPARAMS
;
if
(
effect_update
->
axis_count
)
info
->
dwDynamicParams
|=
DIEP_AXES
;
if
(
effect_update
->
duration_caps
)
info
->
dwDynamicParams
|=
DIEP_DURATION
;
if
(
effect_update
->
gain_caps
)
info
->
dwDynamicParams
|=
DIEP_GAIN
;
if
(
effect_update
->
sample_period_caps
)
info
->
dwDynamicParams
|=
DIEP_SAMPLEPERIOD
;
...
...
@@ -1065,6 +1070,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
->
axes_coll
)
info
->
dwDynamicParams
|=
DIEP_AXES
;
if
(
!
(
collection
=
effect_update
->
type_coll
))
return
DIERR_DEVICENOTREG
;
else
...
...
@@ -1756,6 +1762,7 @@ static BOOL init_pid_reports( struct hid_joystick *impl, struct hid_value_caps *
if
(
instance
->
wCollectionNumber
==
effect_update
->
collection
)
SET_SUB_COLLECTION
(
effect_update
,
type_coll
);
break
;
case
PID_USAGE_AXES_ENABLE
:
SET_SUB_COLLECTION
(
effect_update
,
axes_coll
);
break
;
}
}
...
...
@@ -1805,6 +1812,13 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap
if
(
instance
->
wUsage
==
PID_USAGE_TRIGGER_REPEAT_INTERVAL
)
effect_update
->
trigger_repeat_interval_caps
=
caps
;
}
if
(
instance
->
wCollectionNumber
==
effect_update
->
axes_coll
)
{
SET_REPORT_ID
(
effect_update
);
if
(
effect_update
->
axis_count
>=
6
)
FIXME
(
"more than 6 PID axes detected
\n
"
);
else
effect_update
->
axis_caps
[
effect_update
->
axis_count
]
=
caps
;
effect_update
->
axis_count
++
;
}
#undef SET_REPORT_ID
...
...
dlls/dinput8/tests/hid.c
View file @
b725ccbd
...
...
@@ -3363,9 +3363,7 @@ static BOOL CALLBACK check_effects( const DIEFFECTINFOW *effect, void *args )
check_member
(
*
effect
,
*
exp
,
"%u"
,
dwSize
);
check_member_guid
(
*
effect
,
*
exp
,
guid
);
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwEffType
);
todo_wine
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwStaticParams
);
todo_wine
check_member
(
*
effect
,
*
exp
,
"%#x"
,
dwDynamicParams
);
check_member_wstr
(
*
effect
,
*
exp
,
tszName
);
...
...
@@ -5741,9 +5739,7 @@ static void test_force_feedback_joystick( void )
ok
(
hr
==
DI_OK
,
"IDirectInputDevice8_GetEffectInfo returned %#x
\n
"
,
hr
);
check_member_guid
(
effectinfo
,
expect_effects
[
0
],
guid
);
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwEffType
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwStaticParams
);
todo_wine
check_member
(
effectinfo
,
expect_effects
[
0
],
"%#x"
,
dwDynamicParams
);
check_member_wstr
(
effectinfo
,
expect_effects
[
0
],
tszName
);
...
...
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