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
482768a9
Commit
482768a9
authored
Feb 18, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 18, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Report optional force feedback state only if supported.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d5ff6917
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
3 deletions
+17
-3
joystick_hid.c
dlls/dinput/joystick_hid.c
+17
-3
No files found.
dlls/dinput/joystick_hid.c
View file @
482768a9
...
...
@@ -163,6 +163,9 @@ struct pid_effect_state
{
BYTE
id
;
UINT
collection
;
struct
hid_value_caps
*
safety_switch_caps
;
struct
hid_value_caps
*
actuator_power_caps
;
struct
hid_value_caps
*
actuator_override_switch_caps
;
};
struct
hid_joystick
...
...
@@ -1298,9 +1301,12 @@ static HRESULT hid_joystick_read( IDirectInputDevice8W *iface )
}
}
if
(
!
(
device_state
&
DIGFFS_ACTUATORSON
))
device_state
|=
DIGFFS_ACTUATORSOFF
;
if
(
!
(
device_state
&
DIGFFS_SAFETYSWITCHON
))
device_state
|=
DIGFFS_SAFETYSWITCHOFF
;
if
(
!
(
device_state
&
DIGFFS_USERFFSWITCHON
))
device_state
|=
DIGFFS_USERFFSWITCHOFF
;
if
(
!
(
device_state
&
DIGFFS_POWERON
))
device_state
|=
DIGFFS_POWEROFF
;
if
(
!
(
device_state
&
DIGFFS_SAFETYSWITCHON
)
&&
impl
->
pid_effect_state
.
safety_switch_caps
)
device_state
|=
DIGFFS_SAFETYSWITCHOFF
;
if
(
!
(
device_state
&
DIGFFS_USERFFSWITCHON
)
&&
impl
->
pid_effect_state
.
actuator_override_switch_caps
)
device_state
|=
DIGFFS_USERFFSWITCHOFF
;
if
(
!
(
device_state
&
DIGFFS_POWERON
)
&&
impl
->
pid_effect_state
.
actuator_power_caps
)
device_state
|=
DIGFFS_POWEROFF
;
TRACE
(
"effect %lu state %#x, device state %#x
\n
"
,
index
,
effect_state
,
device_state
);
...
...
@@ -1772,7 +1778,15 @@ static BOOL init_pid_caps( struct hid_joystick *impl, struct hid_value_caps *cap
return
DIENUM_CONTINUE
;
if
(
instance
->
wCollectionNumber
==
effect_state
->
collection
)
{
SET_REPORT_ID
(
effect_state
);
if
(
instance
->
wUsage
==
PID_USAGE_SAFETY_SWITCH
)
effect_state
->
safety_switch_caps
=
caps
;
if
(
instance
->
wUsage
==
PID_USAGE_ACTUATOR_POWER
)
effect_state
->
actuator_power_caps
=
caps
;
if
(
instance
->
wUsage
==
PID_USAGE_ACTUATOR_OVERRIDE_SWITCH
)
effect_state
->
actuator_override_switch_caps
=
caps
;
}
if
(
!
(
instance
->
dwType
&
DIDFT_OUTPUT
))
return
DIENUM_CONTINUE
;
...
...
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