Don't use DeviceStatus on unifying devices

master
pixl 4 years ago
parent 78c0788be6
commit 1056dfa032
No known key found for this signature in database
GPG Key ID: 1866C148CD593B6E
  1. 8
      src/logid/features/DeviceStatus.cpp

@ -25,6 +25,14 @@ using namespace logid::backend;
DeviceStatus::DeviceStatus(logid::Device *dev) : DeviceFeature(dev)
{
/* This feature is redundant on receivers since the receiver
* handles wakeup/sleep events. If the device is connected on a
* receiver, pretend this feature is unsupported.
*/
if(dev->hidpp20().deviceIndex() >= hidpp::WirelessDevice1 &&
dev->hidpp20().deviceIndex() <= hidpp::WirelessDevice6)
throw UnsupportedFeature();
try {
_wireless_device_status =std::make_shared<
hidpp20::WirelessDeviceStatus>(&dev->hidpp20());

Loading…
Cancel
Save