Wait for device to initialize before addDevice

For some reason, hidpp20 device names were badly set (e.g.
'Wireless Mouse MWireless' instead of 'Wireless Mouse MX Master').
Adding a 100ms delay to addDevice seems to have fixed it.
master
pixl 4 years ago
parent 9607c32520
commit 168c28d1e4
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E
  1. 2
      src/logid/backend/raw/DeviceMonitor.cpp

@ -101,6 +101,8 @@ void DeviceMonitor::run()
if (action == "add")
task::spawn([this, name=devnode]() {
// Wait for device to initialise
std::this_thread::sleep_for(std::chrono::milliseconds(100));
auto supported_reports = backend::hidpp::getSupportedReports(
RawDevice::getReportDescriptor(name));
if(supported_reports)

Loading…
Cancel
Save