mirror of
https://github.com/openharmony/distributedhardware_distributed_input.git
synced 2026-07-19 17:43:35 -04:00
Description:fix dinput thread
Match-id-4c6907c6a22d833d6308051f091a6dd7cc8aa6da
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user