diff --git a/common/include/input_hub.cpp b/common/include/input_hub.cpp index 70aaccd..141c761 100644 --- a/common/include/input_hub.cpp +++ b/common/include/input_hub.cpp @@ -223,7 +223,7 @@ bool InputHub::IsTouchPad(const InputDevice &inputDevice) return true; } -void InputHub::MatchAndDealEvent(const RawEvent &event) +void InputHub::MatchAndDealEvent(Device *device, const RawEvent &event) { // Deal key state if (event.type == EV_KEY && event.code != BTN_TOOL_FINGER && event.value == KEY_DOWN_STATE) { @@ -289,7 +289,7 @@ void InputHub::RecordDeviceChangeStates(Device *device, struct input_event readB event.value = iev.value; event.path = device->path; event.descriptor = isTouchEvent ? touchDescriptor : device->identifier.descriptor; - MatchAndDealEvent(event); + MatchAndDealEvent(device, event); } DHLOGD("RecordDeviceChangeStates end."); } diff --git a/common/include/input_hub.h b/common/include/input_hub.h index 853b263..a2be41f 100644 --- a/common/include/input_hub.h +++ b/common/include/input_hub.h @@ -180,7 +180,7 @@ private: * Record Mouse/KeyBoard/TouchPad state such as key down. */ void RecordDeviceChangeStates(Device *device, struct input_event readBuffer[], const size_t count); - void MatchAndDealEvent(const RawEvent &event); + void MatchAndDealEvent(Device *device, const RawEvent &event); /* * Scan the input device node and save info. */