* A more scalable way of initializing the LED items to NULL.
* Tiny coding style cleanup. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@31861 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -98,7 +98,9 @@ KeyboardDevice::KeyboardDevice(HIDReport *inputReport, HIDReport *outputReport)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// find leds if we have an output report
|
// find leds if we have an output report
|
||||||
fLEDs[0] = fLEDs[1] = fLEDs[2] = NULL;
|
for (uint32 i = 0; i < MAX_LEDS; i++)
|
||||||
|
fLEDs[i] = NULL;
|
||||||
|
|
||||||
if (outputReport != NULL) {
|
if (outputReport != NULL) {
|
||||||
for (uint32 i = 0; i < outputReport->CountItems(); i++) {
|
for (uint32 i = 0; i < outputReport->CountItems(); i++) {
|
||||||
HIDReportItem *item = outputReport->ItemAt(i);
|
HIDReportItem *item = outputReport->ItemAt(i);
|
||||||
@@ -554,8 +556,8 @@ KeyboardDevice::_ReadReport(bigtime_t timeout)
|
|||||||
uint16 *compare = fCurrentKeys;
|
uint16 *compare = fCurrentKeys;
|
||||||
for (int32 twice = 0; twice < 2; twice++) {
|
for (int32 twice = 0; twice < 2; twice++) {
|
||||||
for (size_t i = 0; i < fKeyCount; i++) {
|
for (size_t i = 0; i < fKeyCount; i++) {
|
||||||
if (current[i] == 0 || (current[i] == 1 &&
|
if (current[i] == 0 || (current[i] == 1
|
||||||
fKeys[i]->UsagePage() == HID_USAGE_PAGE_KEYBOARD))
|
&& fKeys[i]->UsagePage() == HID_USAGE_PAGE_KEYBOARD))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|||||||
Reference in New Issue
Block a user