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
b36b2999
Commit
b36b2999
authored
Aug 12, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 12, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hid: Return HIDP_STATUS_SUCCESS even if no usages are found.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5679e006
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
3 deletions
+6
-3
hidp.c
dlls/hid/hidp.c
+0
-2
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+6
-0
xinput.c
dlls/xinput1_3/tests/xinput.c
+0
-1
No files found.
dlls/hid/hidp.c
View file @
b36b2999
...
...
@@ -328,7 +328,6 @@ NTSTATUS WINAPI HidP_GetUsages( HIDP_REPORT_TYPE report_type, USAGE usage_page,
*
usages_len
=
params
.
usages
-
usages
;
if
(
status
!=
HIDP_STATUS_SUCCESS
)
return
status
;
if
(
*
usages_len
==
0
)
return
HIDP_STATUS_USAGE_NOT_FOUND
;
if
(
params
.
usages
>
params
.
usages_end
)
return
HIDP_STATUS_BUFFER_TOO_SMALL
;
return
status
;
}
...
...
@@ -672,7 +671,6 @@ NTSTATUS WINAPI HidP_GetUsagesEx( HIDP_REPORT_TYPE report_type, USHORT collectio
*
usages_len
=
params
.
usages
-
usages
;
if
(
status
!=
HIDP_STATUS_SUCCESS
)
return
status
;
if
(
*
usages_len
==
0
)
return
HIDP_STATUS_USAGE_NOT_FOUND
;
if
(
params
.
usages
>
params
.
usages_end
)
return
HIDP_STATUS_BUFFER_TOO_SMALL
;
return
status
;
}
...
...
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
b36b2999
...
...
@@ -2220,6 +2220,12 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled
report
,
caps
.
InputReportByteLength
);
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_SetUsages returned %#x
\n
"
,
status
);
value
=
ARRAY_SIZE
(
usages
);
status
=
HidP_GetUsages
(
HidP_Input
,
HID_USAGE_PAGE_KEYBOARD
,
0
,
usages
,
&
value
,
preparsed_data
,
report
,
caps
.
InputReportByteLength
);
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_GetUsages returned %#x
\n
"
,
status
);
ok
(
value
==
0
,
"got usage count %d, expected %d
\n
"
,
value
,
2
);
usages
[
0
]
=
0x9
;
usages
[
1
]
=
0xb
;
usages
[
2
]
=
0xa
;
...
...
dlls/xinput1_3/tests/xinput.c
View file @
b36b2999
...
...
@@ -678,7 +678,6 @@ static void check_hid_caps(DWORD index, HANDLE device, PHIDP_PREPARSED_DATA pre
length
=
ARRAY_SIZE
(
usages
);
status
=
HidP_GetUsages
(
HidP_Input
,
HID_USAGE_PAGE_BUTTON
,
0
,
usages
,
&
length
,
preparsed
,
buffer
,
hid_caps
->
InputReportByteLength
);
todo_wine
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_GetUsages returned %#x
\n
"
,
status
);
ok
(
length
==
0
,
"got length %u
\n
"
,
length
);
...
...
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