Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
5ce24754
Commit
5ce24754
authored
Feb 14, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 14, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xinput1_3: Use _ordinal rather than _index suffix for haptics waveforms.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
baa417a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
main.c
dlls/xinput1_3/main.c
+11
-11
No files found.
dlls/xinput1_3/main.c
View file @
5ce24754
...
...
@@ -81,8 +81,8 @@ struct xinput_controller
char
*
feature_report_buf
;
BYTE
haptics_report
;
BYTE
haptics_rumble_
index
;
BYTE
haptics_buzz_
index
;
BYTE
haptics_rumble_
ordinal
;
BYTE
haptics_buzz_
ordinal
;
}
hid
;
};
...
...
@@ -244,21 +244,21 @@ static BOOL controller_check_caps(struct xinput_controller *controller, HANDLE d
return
TRUE
;
}
controller
->
hid
.
haptics_buzz_
index
=
0
;
controller
->
hid
.
haptics_rumble_
index
=
0
;
controller
->
hid
.
haptics_buzz_
ordinal
=
0
;
controller
->
hid
.
haptics_rumble_
ordinal
=
0
;
for
(
i
=
3
;
status
==
HIDP_STATUS_SUCCESS
;
++
i
)
{
ULONG
waveform
=
0
;
status
=
HidP_GetUsageValue
(
HidP_Feature
,
HID_USAGE_PAGE_ORDINAL
,
waveform_list
,
i
,
&
waveform
,
preparsed
,
report_buf
,
report_len
);
if
(
status
!=
HIDP_STATUS_SUCCESS
)
WARN
(
"HidP_GetUsageValue returned %#lx
\n
"
,
status
);
else
if
(
waveform
==
HID_USAGE_HAPTICS_WAVEFORM_BUZZ
)
controller
->
hid
.
haptics_buzz_
index
=
i
;
else
if
(
waveform
==
HID_USAGE_HAPTICS_WAVEFORM_RUMBLE
)
controller
->
hid
.
haptics_rumble_
index
=
i
;
else
if
(
waveform
==
HID_USAGE_HAPTICS_WAVEFORM_BUZZ
)
controller
->
hid
.
haptics_buzz_
ordinal
=
i
;
else
if
(
waveform
==
HID_USAGE_HAPTICS_WAVEFORM_RUMBLE
)
controller
->
hid
.
haptics_rumble_
ordinal
=
i
;
}
if
(
!
controller
->
hid
.
haptics_buzz_
index
)
WARN
(
"haptics buzz not supported
\n
"
);
if
(
!
controller
->
hid
.
haptics_rumble_
index
)
WARN
(
"haptics rumble not supported
\n
"
);
if
(
!
controller
->
hid
.
haptics_rumble_
index
&&
!
controller
->
hid
.
haptics_buzz_index
)
return
TRUE
;
if
(
!
controller
->
hid
.
haptics_buzz_
ordinal
)
WARN
(
"haptics buzz not supported
\n
"
);
if
(
!
controller
->
hid
.
haptics_rumble_
ordinal
)
WARN
(
"haptics rumble not supported
\n
"
);
if
(
!
controller
->
hid
.
haptics_rumble_
ordinal
&&
!
controller
->
hid
.
haptics_buzz_ordinal
)
return
TRUE
;
caps_count
=
1
;
status
=
HidP_GetSpecificValueCaps
(
HidP_Output
,
HID_USAGE_PAGE_HAPTICS
,
0
,
HID_USAGE_HAPTICS_MANUAL_TRIGGER
,
...
...
@@ -298,7 +298,7 @@ static DWORD HID_set_state(struct xinput_controller *controller, XINPUT_VIBRATIO
state
->
wLeftMotorSpeed
,
preparsed
,
report_buf
,
report_len
);
if
(
status
!=
HIDP_STATUS_SUCCESS
)
WARN
(
"HidP_SetUsageValue INTENSITY returned %#lx
\n
"
,
status
);
status
=
HidP_SetUsageValue
(
HidP_Output
,
HID_USAGE_PAGE_HAPTICS
,
0
,
HID_USAGE_HAPTICS_MANUAL_TRIGGER
,
controller
->
hid
.
haptics_rumble_
index
,
preparsed
,
report_buf
,
report_len
);
controller
->
hid
.
haptics_rumble_
ordinal
,
preparsed
,
report_buf
,
report_len
);
if
(
status
!=
HIDP_STATUS_SUCCESS
)
WARN
(
"HidP_SetUsageValue MANUAL_TRIGGER returned %#lx
\n
"
,
status
);
if
(
!
HidD_SetOutputReport
(
controller
->
device
,
report_buf
,
report_len
))
{
...
...
@@ -313,7 +313,7 @@ static DWORD HID_set_state(struct xinput_controller *controller, XINPUT_VIBRATIO
state
->
wRightMotorSpeed
,
preparsed
,
report_buf
,
report_len
);
if
(
status
!=
HIDP_STATUS_SUCCESS
)
WARN
(
"HidP_SetUsageValue INTENSITY returned %#lx
\n
"
,
status
);
status
=
HidP_SetUsageValue
(
HidP_Output
,
HID_USAGE_PAGE_HAPTICS
,
0
,
HID_USAGE_HAPTICS_MANUAL_TRIGGER
,
controller
->
hid
.
haptics_buzz_
index
,
preparsed
,
report_buf
,
report_len
);
controller
->
hid
.
haptics_buzz_
ordinal
,
preparsed
,
report_buf
,
report_len
);
if
(
status
!=
HIDP_STATUS_SUCCESS
)
WARN
(
"HidP_SetUsageValue MANUAL_TRIGGER returned %#lx
\n
"
,
status
);
if
(
!
HidD_SetOutputReport
(
controller
->
device
,
report_buf
,
report_len
))
{
...
...
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