[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:
Thomas Faber 2014-01-18 19:18:33 +00:00
parent a58d50de18
commit 6c05d66386

View file

@ -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
@ -733,7 +733,6 @@ HidParser_GetScaledUsageValueWithReport(
//
Data = 0;
Parser->Copy(&Data, &ReportDescriptor[ReportItem->ByteOffset + 1], min(sizeof(ULONG), ReportDescriptorLength - (ReportItem->ByteOffset + 1)));
Data = ReportDescriptor[ReportItem->ByteOffset + 1];
//
// shift data
@ -812,7 +811,6 @@ HidParser_GetScanCodeFromCustUsage(
//
return CustomerScanCodes[i].ScanCode;
}
}
//