mirror of
https://github.com/reactos/reactos.git
synced 2025-05-06 10:28:45 +00:00
[HIDPARSER]
- Use the full bit range of input items instead of discarding high bits CORE-7772 #resolve svn path=/trunk/; revision=61680
This commit is contained in:
parent
a58d50de18
commit
6c05d66386
1 changed files with 6 additions and 8 deletions
|
@ -602,7 +602,7 @@ HidParser_GetUsageValueWithReport(
|
|||
return HIDPARSER_STATUS_INVALID_REPORT_LENGTH;
|
||||
}
|
||||
|
||||
for(Index = 0; Index < Report->ItemCount; Index++)
|
||||
for (Index = 0; Index < Report->ItemCount; Index++)
|
||||
{
|
||||
//
|
||||
// get report item
|
||||
|
@ -632,10 +632,10 @@ HidParser_GetUsageValueWithReport(
|
|||
ASSERT(ReportItem->ByteOffset < ReportDescriptorLength);
|
||||
|
||||
//
|
||||
// FIXME: support items with variable bitlength
|
||||
// one extra shift for skipping the prepended report id
|
||||
//
|
||||
ASSERT(ReportItem->BitCount == 16);
|
||||
Data = (ReportDescriptor[ReportItem->ByteOffset +1] & 0xFF) | (ReportDescriptor[ReportItem->ByteOffset +2] & 0xFF) << 8;
|
||||
Data = 0;
|
||||
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
||||
|
||||
//
|
||||
// shift data
|
||||
|
@ -699,7 +699,7 @@ HidParser_GetScaledUsageValueWithReport(
|
|||
return HIDPARSER_STATUS_INVALID_REPORT_LENGTH;
|
||||
}
|
||||
|
||||
for(Index = 0; Index < Report->ItemCount; Index++)
|
||||
for (Index = 0; Index < Report->ItemCount; Index++)
|
||||
{
|
||||
//
|
||||
// get report item
|
||||
|
@ -732,8 +732,7 @@ HidParser_GetScaledUsageValueWithReport(
|
|||
// one extra shift for skipping the prepended report id
|
||||
//
|
||||
Data = 0;
|
||||
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset +1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
||||
Data = ReportDescriptor[ReportItem->ByteOffset + 1];
|
||||
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
||||
|
||||
//
|
||||
// shift data
|
||||
|
@ -812,7 +811,6 @@ HidParser_GetScanCodeFromCustUsage(
|
|||
//
|
||||
return CustomerScanCodes[i].ScanCode;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue