Blob Blame History Raw
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)