diff --git a/src/add-ons/kernel/drivers/input/hid_shared/HIDParser.cpp b/src/add-ons/kernel/drivers/input/hid_shared/HIDParser.cpp
index aaef7dce68..a131a0d22f 100644
a
|
b
|
HIDParser::ReportAt(uint8 type, uint8 index)
|
430 | 430 | |
431 | 431 | size_t |
432 | 432 | HIDParser::MaxReportSize() |
| 433 | { |
| 434 | return MaxReportSize(HID_REPORT_TYPE_ANY); |
| 435 | } |
| 436 | |
| 437 | size_t |
| 438 | HIDParser::MaxReportSize(uint8 type) |
433 | 439 | { |
434 | 440 | size_t maxSize = 0; |
435 | 441 | for (int32 i = 0; i < fReports.Count(); i++) { |
436 | 442 | HIDReport *report = fReports[i]; |
437 | 443 | if (report == NULL) |
438 | 444 | continue; |
| 445 | |
| 446 | if (type != HID_REPORT_TYPE_ANY && report->Type() != type) |
| 447 | continue; |
439 | 448 | |
440 | 449 | if (report->ReportSize() > maxSize) |
441 | 450 | maxSize = report->ReportSize(); |
diff --git a/src/add-ons/kernel/drivers/input/hid_shared/HIDParser.h b/src/add-ons/kernel/drivers/input/hid_shared/HIDParser.h
index 75f1101158..b8523eb431 100644
a
|
b
|
public:
|
30 | 30 | uint8 CountReports(uint8 type); |
31 | 31 | HIDReport * ReportAt(uint8 type, uint8 index); |
32 | 32 | size_t MaxReportSize(); |
| 33 | size_t MaxReportSize(uint8 type); |
33 | 34 | |
34 | 35 | HIDCollection * RootCollection() { return fRootCollection; }; |
35 | 36 | |
diff --git a/src/add-ons/kernel/drivers/input/hid_shared/KeyboardProtocolHandler.cpp b/src/add-ons/kernel/drivers/input/hid_shared/KeyboardProtocolHandler.cpp
index ad3128b482..8df5750440 100644
a
|
b
|
KeyboardProtocolHandler::KeyboardProtocolHandler(HIDReport &inputReport,
|
110 | 110 | #ifdef USB_KDL |
111 | 111 | sDebugKeyboardPipe = fInputReport.Device()->InterruptPipe(); |
112 | 112 | #endif |
113 | | sDebugKeyboardReportSize = fInputReport.Parser()->MaxReportSize(); |
| 113 | sDebugKeyboardReportSize = fInputReport.Parser()->MaxReportSize(HID_REPORT_TYPE_INPUT); |
114 | 114 | if (outputReport != NULL) |
115 | 115 | sDebugKeyboardFound = true; |
116 | 116 | } |
… |
… |
KeyboardProtocolHandler::_ReadReport(bigtime_t timeout, uint32 *cookie)
|
794 | 794 | = fInputReport.Device()->InterruptPipe(); |
795 | 795 | #endif |
796 | 796 | sDebugKeyboardReportSize |
797 | | = fInputReport.Parser()->MaxReportSize(); |
| 797 | = fInputReport.Parser()->MaxReportSize(HID_REPORT_TYPE_INPUT); |
798 | 798 | #endif |
799 | 799 | |
800 | 800 | char letter = current[i] - 4 + 'a'; |
diff --git a/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp b/src/add-ons/kernel/drivers/input/usb_hid/HIDDevice.cpp
index cbce1e65ee..25b5806a83 100644
a
|
b
|
HIDDevice::HIDDevice(usb_device device, const usb_configuration_info *config,
|
181 | 181 | return; |
182 | 182 | } |
183 | 183 | |
184 | | fTransferBufferSize = fParser.MaxReportSize(); |
| 184 | fTransferBufferSize = fParser.MaxReportSize(HID_REPORT_TYPE_INPUT); |
185 | 185 | if (fTransferBufferSize == 0) { |
186 | 186 | TRACE_ALWAYS("report claims a report size of 0\n"); |
187 | 187 | return; |