mirror of
https://github.com/reactos/reactos.git
synced 2025-05-15 07:17:23 +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
|
@ -632,10 +632,10 @@ HidParser_GetUsageValueWithReport(
|
||||||
ASSERT(ReportItem->ByteOffset < ReportDescriptorLength);
|
ASSERT(ReportItem->ByteOffset < ReportDescriptorLength);
|
||||||
|
|
||||||
//
|
//
|
||||||
// FIXME: support items with variable bitlength
|
// one extra shift for skipping the prepended report id
|
||||||
//
|
//
|
||||||
ASSERT(ReportItem->BitCount == 16);
|
Data = 0;
|
||||||
Data = (ReportDescriptor[ReportItem->ByteOffset +1] & 0xFF) | (ReportDescriptor[ReportItem->ByteOffset +2] & 0xFF) << 8;
|
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
||||||
|
|
||||||
//
|
//
|
||||||
// shift data
|
// shift data
|
||||||
|
@ -733,7 +733,6 @@ HidParser_GetScaledUsageValueWithReport(
|
||||||
//
|
//
|
||||||
Data = 0;
|
Data = 0;
|
||||||
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
|
||||||
Data = ReportDescriptor[ReportItem->ByteOffset + 1];
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// shift data
|
// shift data
|
||||||
|
@ -812,7 +811,6 @@ HidParser_GetScanCodeFromCustUsage(
|
||||||
//
|
//
|
||||||
return CustomerScanCodes[i].ScanCode;
|
return CustomerScanCodes[i].ScanCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
Loading…
Reference in a new issue