tools: fix up call to udev matching in hidconsole

This commit is contained in:
Peter F. Patel-Schneider 2021-03-02 18:59:09 -05:00
parent 3d3d0d4ccc
commit 3cd76aa191
1 changed files with 5 additions and 1 deletions

View File

@ -150,9 +150,13 @@ def _validate_input(line, hidpp=False):
def _open(args): def _open(args):
def matchfn(bid, vid, pid):
if vid == 0x046d:
return {'vid': 0x046d}
device = args.device device = args.device
if args.hidpp and not device: if args.hidpp and not device:
for d in _hid.enumerate(vendor_id=0x046d): for d in _hid.enumerate(matchfn):
if d.driver == 'logitech-djreceiver': if d.driver == 'logitech-djreceiver':
device = d.path device = d.path
break break