You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
gentoo-overlay/games-arcade/whichwayisup/files/whichwayisup-0.7.9-check_fo...

22 lines
582 B

From: Markus Koschany <apo@debian.org>
Date: Tue, 28 May 2013 18:40:34 +0200
Subject: check for joystick axes not null
---
lib/game.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/game.py b/lib/game.py
index f0afd84..30f86fd 100644
--- a/lib/game.py
+++ b/lib/game.py
@@ -138,7 +138,7 @@ def parse_inputs(joystick = None):
if keys[K_F10]:
inputs["SPECIAL"] = True
- if joystick != None: # Parse joystick input
+ if joystick != None and joystick.get_numaxes() != 0: # Parse joystick input
axis0 = joystick.get_axis(0)