Description:fix dinput thread

Match-id-4c6907c6a22d833d6308051f091a6dd7cc8aa6da
This commit is contained in:
xxxx
2022-06-16 16:15:44 +08:00
parent ea3b773a35
commit bee1afccfa
7 changed files with 46 additions and 12 deletions
@@ -167,7 +167,7 @@ void *DistributedInputHandler::CollectEventsThread(void *param)
void DistributedInputHandler::StartInputMonitorDeviceThread(const std::string deviceId)
{
while (isCollectingEvents_) {
size_t count = inputHub_->CollectInputHandler(mEventBuffer, INPUT_DEVICR_BUFFER_SIZE);
size_t count = inputHub_->StartCollectInputHandler(mEventBuffer, INPUT_DEVICR_BUFFER_SIZE);
if (count > 0) {
DHLOGI("Count: %zu", count);
for (size_t iCnt = 0; iCnt < count; iCnt++) {
@@ -205,6 +205,7 @@ void DistributedInputHandler::StopInputMonitorDeviceThread()
{
isCollectingEvents_ = false;
isStartCollectEventThread = false;
inputHub_->StopCollectInputHandler();
if (collectThreadID_ != (pthread_t)(-1)) {
DHLOGI("DistributedInputHandler::Wait collect thread exit");
pthread_join(collectThreadID_, NULL);