From 1a36ec65ee05c6690d88980e05afab2d090aac8f Mon Sep 17 00:00:00 2001 From: Daniel Pavel Date: Thu, 20 Jun 2013 12:55:48 +0200 Subject: [PATCH] faster checking of feature-based settings --- lib/logitech/unifying_receiver/descriptors.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/logitech/unifying_receiver/descriptors.py b/lib/logitech/unifying_receiver/descriptors.py index 3d17a488..34bd02e9 100644 --- a/lib/logitech/unifying_receiver/descriptors.py +++ b/lib/logitech/unifying_receiver/descriptors.py @@ -47,7 +47,9 @@ def _feature_fn_swap(): def check_features(device, already_known): - if _hidpp20.FEATURE.FN_INVERSION in device.features and not any(s.name == 'fn-swap' for s in already_known): + if device.protocol < 2.0: + return + if not any(s.name == _FN_SWAP[0] for s in already_known) and _hidpp20.FEATURE.FN_INVERSION in device.features: already_known.append(_feature_fn_swap()) #