Listen for events on receiver device on timeout

Previously, if a receiver device didn't respond during the initial scan,
logid would not recognize it until it sent a wakeup/connect event.

This makes it so if the device times out, logid will listen for the next
event from the device and try detecting it. (e.g. shaking the mouse will
make it become detected)
This commit is contained in:
pixl
2020-07-12 04:42:44 -04:00
parent 1a056a1ecf
commit 4ce76f5927
7 changed files with 46 additions and 0 deletions
+1
View File
@@ -238,6 +238,7 @@ hidpp::DeviceConnectionEvent Receiver::deviceConnectionEvent(const
event.encrypted = report.paramBegin()[0] & (1<<5);
event.linkEstablished = !(report.paramBegin()[0] & (1<<6));
event.withPayload = report.paramBegin()[0] & (1<<7);
event.fromTimeoutCheck = false;
event.pid =(report.paramBegin()[2] << 8);
event.pid |= report.paramBegin()[1];