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
b117f654
Commit
b117f654
authored
Aug 25, 2021
by
Rémi Bernon
Committed by
Alexandre Julliard
Aug 26, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Fix nary usage collections index ordering.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6b504fe7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
5 deletions
+2
-5
main.c
dlls/hidparse.sys/main.c
+2
-2
ntoskrnl.c
dlls/ntoskrnl.exe/tests/ntoskrnl.c
+0
-3
No files found.
dlls/hidparse.sys/main.c
View file @
b117f654
...
...
@@ -354,14 +354,13 @@ static BOOL parse_new_value_caps( struct hid_parser_state *state, HIDP_REPORT_TY
}
value
=
state
->
values
[
type
]
+
*
value_idx
;
state
->
items
.
start_index
=
0
;
state
->
items
.
start_index
=
usages_size
;
if
(
!
(
is_array
=
HID_VALUE_CAPS_IS_ARRAY
(
&
state
->
items
)))
state
->
items
.
report_count
-=
usages_size
-
1
;
else
state
->
items
.
start_bit
-=
state
->
items
.
report_count
*
state
->
items
.
bit_size
;
while
(
usages_size
--
)
{
if
(
!
is_array
)
state
->
items
.
start_bit
-=
state
->
items
.
report_count
*
state
->
items
.
bit_size
;
else
state
->
items
.
start_index
+=
1
;
state
->
items
.
usage_page
=
state
->
usages_page
[
usages_size
];
state
->
items
.
usage_min
=
state
->
usages_min
[
usages_size
];
state
->
items
.
usage_max
=
state
->
usages_max
[
usages_size
];
...
...
@@ -371,6 +370,7 @@ static BOOL parse_new_value_caps( struct hid_parser_state *state, HIDP_REPORT_TY
*
value
++
=
state
->
items
;
*
value_idx
+=
1
;
if
(
!
is_array
)
state
->
items
.
report_count
=
1
;
else
state
->
items
.
start_index
-=
1
;
}
state
->
items
.
usage_page
=
usage_page
;
...
...
dlls/ntoskrnl.exe/tests/ntoskrnl.c
View file @
b117f654
...
...
@@ -2340,10 +2340,8 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled
status
=
HidP_SetUsages
(
HidP_Input
,
HID_USAGE_PAGE_KEYBOARD
,
0
,
usages
,
&
value
,
preparsed_data
,
report
,
caps
.
InputReportByteLength
);
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_SetUsages returned %#x
\n
"
,
status
);
todo_wine
ok
(
report
[
caps
.
InputReportByteLength
-
2
]
==
3
,
"unexpected usage index %d, expected 3
\n
"
,
report
[
caps
.
InputReportByteLength
-
2
]);
todo_wine
ok
(
report
[
caps
.
InputReportByteLength
-
1
]
==
4
,
"unexpected usage index %d, expected 4
\n
"
,
report
[
caps
.
InputReportByteLength
-
1
]);
report
[
caps
.
InputReportByteLength
-
2
]
=
0
;
...
...
@@ -2353,7 +2351,6 @@ static void test_hidp(HANDLE file, HANDLE async_file, int report_id, BOOL polled
status
=
HidP_SetUsages
(
HidP_Input
,
HID_USAGE_PAGE_KEYBOARD
,
0
,
usages
,
&
value
,
preparsed_data
,
report
,
caps
.
InputReportByteLength
);
ok
(
status
==
HIDP_STATUS_SUCCESS
,
"HidP_SetUsages returned %#x
\n
"
,
status
);
todo_wine
ok
(
report
[
caps
.
InputReportByteLength
-
2
]
==
1
,
"unexpected usage index %d, expected 1
\n
"
,
report
[
caps
.
InputReportByteLength
-
2
]);
...
...
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