HID: Fix usage page following hrev55413.

Modifications made on hrev55413 removed UsageID from array Items,
but also (bug here) broke UsagePage, needed by KeyboardHandler
in order to recognize items as Keyboard ones.

Fixes #17263.

Change-Id: I4b73c69240f31d3c8c2aacf6bab0d270f2053387
Reviewed-on: https://review.haiku-os.org/c/haiku/+/4458
Reviewed-by: waddlesplash <waddlesplash@gmail.com>
Tested-by: Commit checker robot <no-reply+buildbot@haiku-os.org>
This commit is contained in:
Lt-Henry 2021-09-13 00:39:49 +02:00 committed by waddlesplash
parent c1740f4f53
commit a731585f88

View File

@ -107,7 +107,14 @@ HIDReport::AddMainItem(global_item_state &globalState,
}
}
uint32 usage = 0;
usage_value page;
if (localState.usage_stack_used > 0) {
page = localState.usage_stack[0];
page.u.s.usage_id = 0;
}
uint32 usage = page.u.extended;
for (uint32 i = 0; i < globalState.report_count; i++) {
if (mainData.array_variable == 1) {