faster checking of feature-based settings

This commit is contained in:
Daniel Pavel 2013-06-20 12:55:48 +02:00
parent d07a20e6f8
commit 1a36ec65ee
1 changed files with 3 additions and 1 deletions

View File

@ -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())
#