From 3cd76aa1912cf9e33320f914956f1006dca6d7a7 Mon Sep 17 00:00:00 2001 From: "Peter F. Patel-Schneider" Date: Tue, 2 Mar 2021 18:59:09 -0500 Subject: [PATCH] tools: fix up call to udev matching in hidconsole --- lib/hidapi/hidconsole.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/hidapi/hidconsole.py b/lib/hidapi/hidconsole.py index 2a37b4f4..e4903740 100644 --- a/lib/hidapi/hidconsole.py +++ b/lib/hidapi/hidconsole.py @@ -150,9 +150,13 @@ def _validate_input(line, hidpp=False): def _open(args): + def matchfn(bid, vid, pid): + if vid == 0x046d: + return {'vid': 0x046d} + device = args.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': device = d.path break