diff options
Diffstat (limited to 'turtetris_master/usb_input.py')
-rw-r--r-- | turtetris_master/usb_input.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/turtetris_master/usb_input.py b/turtetris_master/usb_input.py index 8864ef9..0bb9d56 100644 --- a/turtetris_master/usb_input.py +++ b/turtetris_master/usb_input.py @@ -1,4 +1,5 @@ import usb.core +import usb.backend.libusb1 import usb.util # Personal Communication Systems, Inc. SNES Gamepad @@ -14,8 +15,11 @@ class Gamepad: def __init__(self, conf=CONF_SNES_GAMEPAD): "Initializes usb subsystem" + backend = usb.backend.libusb1.get_backend(find_library=lambda x: + "/usr/lib/libusb-1.0.so") self.dev = usb.core.find(idVendor=conf['idVendor'], - idProduct=conf['idProduct']) + idProduct=conf['idProduct'], + backend=backend) if self.dev is None: raise ValueError('Device not found') |