aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsetup.py7
-rw-r--r--turtetris_master/led_output.py0
-rw-r--r--turtetris_master/usb_input.py6
3 files changed, 6 insertions, 7 deletions
diff --git a/setup.py b/setup.py
index 798eb8f..348f7cf 100755
--- a/setup.py
+++ b/setup.py
@@ -21,10 +21,5 @@ setup(
],
keywords='Turris Tetris',
- packages=['turtetris_master'],
- entry_points={
- 'console_scripts': [
- 'turtetris-master=turtetris_master:main'
- ]
- }
+ packages=['turtetris_master']
)
diff --git a/turtetris_master/led_output.py b/turtetris_master/led_output.py
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/turtetris_master/led_output.py
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')