From fecfa8ccd07bbf1b8731387d4cb89fe1ed2806f7 Mon Sep 17 00:00:00 2001 From: iwgeric Date: Sun, 19 Apr 2015 12:38:43 -0400 Subject: [PATCH] Android: add joystick compatibility mapping for XBOX 360 controller connected to Android device using USB dongle --- .../resources/joystick-mapping.properties | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/jme3-core/src/main/resources/joystick-mapping.properties b/jme3-core/src/main/resources/joystick-mapping.properties index 5f29e4105..d7ce2f50a 100644 --- a/jme3-core/src/main/resources/joystick-mapping.properties +++ b/jme3-core/src/main/resources/joystick-mapping.properties @@ -6,7 +6,7 @@ # the new name as it will be reported through the Joystick # interface. # -# Keys with spaces in them should have those spaces escaped. +# Keys with spaces in them should have those spaces escaped. # Values do not need their spaces escaped. For example: # # Some\ Joystick.0=3 @@ -37,22 +37,29 @@ Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).ry=rz # requires custom code to support trigger buttons but this # keeps it from confusing the .rx mapping. Controller\ (Xbox\ 360\ Wireless\ Receiver\ for\ Windows).z=trigger - + # Xbox 360 Controller (copied from wireless version) Controller\ (XBOX\ 360\ For\ Windows).0=2 Controller\ (XBOX\ 360\ For\ Windows).1=1 Controller\ (XBOX\ 360\ For\ Windows).2=3 Controller\ (XBOX\ 360\ For\ Windows).3=0 - + Controller\ (XBOX\ 360\ For\ Windows).6=8 Controller\ (XBOX\ 360\ For\ Windows).7=9 - + Controller\ (XBOX\ 360\ For\ Windows).8=10 Controller\ (XBOX\ 360\ For\ Windows).9=11 - + Controller\ (XBOX\ 360\ For\ Windows).rx=z Controller\ (XBOX\ 360\ For\ Windows).ry=rz - + # requires custom code to support trigger buttons but this # keeps it from confusing the .rx mapping. Controller\ (XBOX\ 360\ For\ Windows).z=trigger + +# XBOX 360 Controller connected to Android using +# the USB dongle +Xbox\ 360\ Wireless\ Receiver.AXIS_RX=z +Xbox\ 360\ Wireless\ Receiver.AXIS_RY=rz +Xbox\ 360\ Wireless\ Receiver.z=AXIS_RX +Xbox\ 360\ Wireless\ Receiver.rz=AXIS_RY