Possible to reverse directions in gamepad mapping

This commit is contained in:
Iwan Timmer
2014-01-28 14:49:58 +01:00
parent 07c6c55577
commit 61a2c8abad
4 changed files with 38 additions and 16 deletions

View File

@@ -50,14 +50,14 @@ public class EvdevHandler implements Runnable {
inputBuffer = ByteBuffer.allocate(EvdevConstants.MAX_STRUCT_SIZE_BYTES);
inputBuffer.order(ByteOrder.nativeOrder());
absLX = new EvdevAbsolute(device, mapping.abs_x);
absLY = new EvdevAbsolute(device, mapping.abs_y);
absRX = new EvdevAbsolute(device, mapping.abs_rx);
absRY = new EvdevAbsolute(device, mapping.abs_ry);
absLT = new EvdevAbsolute(device, mapping.abs_rudder);
absRT = new EvdevAbsolute(device, mapping.abs_throttle);
absDX = new EvdevAbsolute(device, mapping.abs_dpad_x);
absDY = new EvdevAbsolute(device, mapping.abs_dpad_y);
absLX = new EvdevAbsolute(device, mapping.abs_x, mapping.reverse_x);
absLY = new EvdevAbsolute(device, mapping.abs_y, mapping.reverse_y);
absRX = new EvdevAbsolute(device, mapping.abs_rx, mapping.reverse_rx);
absRY = new EvdevAbsolute(device, mapping.abs_ry, mapping.reverse_ry);
absLT = new EvdevAbsolute(device, mapping.abs_rudder, mapping.reverse_rudder);
absRT = new EvdevAbsolute(device, mapping.abs_throttle, mapping.reverse_throttle);
absDX = new EvdevAbsolute(device, mapping.abs_dpad_x, mapping.reverse_dpad_x);
absDY = new EvdevAbsolute(device, mapping.abs_dpad_y, mapping.reverse_dpad_y);
translator = new KeyboardTranslator(conn);
}