From fc59c0fbf6b228ef768ccecdfb9c4d7465fe4b0c Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Mon, 28 Sep 2020 14:45:32 -0400 Subject: [PATCH] device: only look up feature notifications in SLIDING DPI setting --- lib/logitech_receiver/settings_templates.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/logitech_receiver/settings_templates.py b/lib/logitech_receiver/settings_templates.py index bda826c0..1aa4ce20 100644 --- a/lib/logitech_receiver/settings_templates.py +++ b/lib/logitech_receiver/settings_templates.py @@ -466,7 +466,7 @@ def _feature_dpi_sliding(): def handler(device, n): """Called on notification events from the mouse.""" - if device.features[n.sub_id] == _F.REPROG_CONTROLS_V4: + if n.sub_id < 0x40 and device.features[n.sub_id] == _F.REPROG_CONTROLS_V4: state = device._mxVerticalDpiState if n.address == 0x00: cid1, cid2, cid3, cid4 = _unpack('!HHHH', n.data[:8])