From d9dd8603b8766d1db47ea46cf65782701eb2d172 Mon Sep 17 00:00:00 2001 From: "PSp..om" Date: Thu, 27 Sep 2012 21:33:52 +0000 Subject: [PATCH] Remap logical ID instead of name since it is now logical ID that is used for look-ups and it is not locale specific. git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@9783 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../com/jme3/input/lwjgl/JInputJoyInput.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/engine/src/lwjgl/com/jme3/input/lwjgl/JInputJoyInput.java b/engine/src/lwjgl/com/jme3/input/lwjgl/JInputJoyInput.java index 2062a3f38..428ed66eb 100644 --- a/engine/src/lwjgl/com/jme3/input/lwjgl/JInputJoyInput.java +++ b/engine/src/lwjgl/com/jme3/input/lwjgl/JInputJoyInput.java @@ -213,14 +213,15 @@ public class JInputJoyInput implements JoyInput { throw new IllegalArgumentException( "Component is not an axis:" + comp ); } - String original = comp.getName(); - String name = JoystickCompatibilityMappings.remapComponent( controller.getName(), original ); + String name = comp.getName(); + String original = id.getName(); + String logicalId = JoystickCompatibilityMappings.remapComponent( controller.getName(), original ); if( name != original ) { - logger.log(Level.INFO, "Remapped:" + original + " to:" + name); + logger.log(Level.INFO, "Remapped:" + original + " to:" + logicalId); } JoystickButton button = new DefaultJoystickButton( getInputManager(), this, getButtonCount(), - name, id.getName() ); + name, logicalId ); addButton(button); buttonIndex.put( comp, button ); } @@ -234,14 +235,15 @@ public class JInputJoyInput implements JoyInput { throw new IllegalArgumentException( "Component is not an axis:" + comp ); } - String original = comp.getName(); - String name = JoystickCompatibilityMappings.remapComponent( controller.getName(), original ); + String name = comp.getName(); + String original = id.getName(); + String logicalId = JoystickCompatibilityMappings.remapComponent( controller.getName(), original ); if( name != original ) { - logger.log(Level.INFO, "Remapped:" + original + " to:" + name); + logger.log(Level.INFO, "Remapped:" + original + " to:" + logicalId); } JoystickAxis axis = new DefaultJoystickAxis( getInputManager(), - this, getAxisCount(), name, id.getName(), + this, getAxisCount(), name, logicalId, comp.isAnalog(), comp.isRelative(), comp.getDeadZone() ); addAxis(axis);