mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 14:53:09 +00:00
[HIDPARSE]
- Implement HidP_GetUsagesEx - HidP_GetUsagesEx uses HidP_GetUsages with undefined usage page - Required for hid usb support - Check if there is a maximum set. In that case verify if a usage maximum has been set and apply it to the currnt usage. Fixes asserts while usb composite device installation (keyboard) svn path=/branches/usb-bringup-trunk/; revision=55357
This commit is contained in:
parent
3bb6d463d3
commit
d0cec1a401
2 changed files with 59 additions and 21 deletions
|
@ -535,20 +535,21 @@ HidParser_InitReportItem(
|
|||
// get usage minimum from local state
|
||||
//
|
||||
UsageValue = LocalItemState->UsageMinimum;
|
||||
ASSERT(LocalItemState->UsageMinimumSet);
|
||||
ASSERT(LocalItemState->UsageMaximumSet);
|
||||
|
||||
//
|
||||
// append item index
|
||||
//
|
||||
UsageValue.u.Extended += ReportItemIndex;
|
||||
|
||||
if (UsageValue.u.Extended > LocalItemState->UsageMaximum.u.Extended)
|
||||
if (LocalItemState->UsageMaximumSet)
|
||||
{
|
||||
//
|
||||
// maximum reached
|
||||
//
|
||||
UsageValue.u.Extended = LocalItemState->UsageMaximum.u.Extended;
|
||||
if (UsageValue.u.Extended > LocalItemState->UsageMaximum.u.Extended)
|
||||
{
|
||||
//
|
||||
// maximum reached
|
||||
//
|
||||
UsageValue.u.Extended = LocalItemState->UsageMaximum.u.Extended;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue