If you do not receive your verification email after registering, please check your spam folder. You can also get in contact with us via other methods.
Если вы не получили письмо c подтверждением регистрации, пожалуйста, проверьте папку спам. В случае отсутствия письма и там напишите нам другим способом.

Remapping XInput xbox 360 gamepad

Community-based support for our public releases.
Общественная поддержка для публичных релизов.
Post Reply
User avatar
AEBus
Posts: 4
Joined: 21 Sep 2018, 16:25
Gender: Male

Remapping XInput xbox 360 gamepad

Post by AEBus »

Hello. My gamepad (wired xbox 360 gamepad) supported by the game and all buttons work fine. But i want swap A (CROSS) with B (CIRCLE).
Buttons in debug consolle are defined as follows:

Code: Select all

TRIANGLE (Y) — Gamepad event, button: 3
CIRCLE (B) — Gamepad event, button: 1
CROSS (A) — Gamepad event, button: 0
SQUARE (X) — Gamepad event, button: 2
L1 (left trigger?) — when pressed nothing happens in console and in game
R1 (right trigger?) — when pressed nothing happens in console, but in game button work as skip
DOWN (direct pad?) — Gamepad event, hat move: 4 (when pressed)/ Gamepad event, hat move: 0 (when released)
LEFT (direct pad?) — Gamepad event, hat move: 8 (when pressed)/ Gamepad event, hat move: 0 (when released)
UP (direct pad?) — Gamepad event, hat move: 1 (when pressed)/ Gamepad event, hat move: 0 (when released)
RIGHT (direct pad?) — Gamepad event, hat move: 2 (when pressed)/ Gamepad event, hat move: 0 (when released)
SELECT (back) — Gamepad event, button: 6
START (start) — Gamepad event, button: 7
HOME (guide?) — Gamepad event, button: 10
L2 (left bumper?) — Gamepad event, button: 4
R2 (right bumper?) — Gamepad event, button: 5
L3 (pressed left stick?) — Gamepad event, button: 8
R3 (pressed right stick?) — Gamepad event, button: 9
EXTRA (i dont know what is)
DOWN (direct pad?) — Gamepad event, hat move: 4 (when pressed)/ Gamepad event, hat move: 0 (when released)
LEFT (direct pad?) — Gamepad event, hat move: 8 (when pressed)/ Gamepad event, hat move: 0 (when released)
UP (direct pad?) — Gamepad event, hat move: 1 (when pressed)/ Gamepad event, hat move: 0 (when released)
RIGHT (direct pad?)  — Gamepad event, hat move: 2 (when pressed)/ Gamepad event, hat move: 0 (when released)
so, i want swap A (CROSS) with B (CIRCLE), and in config i wrote this:

Code: Select all

pad-map=3,0,1,2,-1,-1,4,8,1,2,6,7,10,4,5,8,9,-1,4,8,1,2
With this parameter direct pad buttons not work, when i press CIRCLE (B) triggered UP, when i press L2 (LB) triggered DOWN.
vit9696
Администратор
Posts: 1767
Joined: 24 Feb 2015, 00:48
Gender: Male

Re: Remapping XInput xbox 360 gamepad

Post by vit9696 »

Just like Knox said, last 4 numbers should be 18,19,20,21. The engine is misleading as in hat case it prints sdl keycodes instead of ons mapped buttons:

Code: Select all

pad-map=3,0,1,2,-1,-1,4,8,1,2,6,7,10,4,5,8,9,-1,18,19,20,21
We will fix it in a subsequent update ;)
User avatar
AEBus
Posts: 4
Joined: 21 Sep 2018, 16:25
Gender: Male

Re: Remapping XInput xbox 360 gamepad

Post by AEBus »

I am confused by the fact that in the configuration these buttons are mentioned 2 times
TRIANGLE, CIRCLE, CROSS, SQUARE, L1, R1, DOWN, LEFT, UP, RIGHT, SELECT, START, HOME, L2, R2, L3, R3, EXTRA, DOWN, LEFT, UP, RIGHT
Last edited by AEBus on 22 Sep 2018, 15:04, edited 2 times in total.
vit9696
Администратор
Posts: 1767
Joined: 24 Feb 2015, 00:48
Gender: Male

Re: Remapping XInput xbox 360 gamepad

Post by vit9696 »

There should not be any confusion here, some gamepads report arrows as buttons (first four), and some others as hat moves (second four). Second four buttons are a later addition, and I was not careful enough to label them carefully.

Knox, could you please update our FAQs to use HAT_ prefix for the second group? HAT_DOWN, HAT_UP, etc.
User avatar
AEBus
Posts: 4
Joined: 21 Sep 2018, 16:25
Gender: Male

Re: Remapping XInput xbox 360 gamepad

Post by AEBus »

With
pad-map=3,0,1,2,-1,-1,4,8,1,2,6,7,10,4,5,8,9,-1,18,19,20,21
direct pad buttons work, but when i press CIRCLE (B) triggered UP, when i press L2 (LB) triggered DOWN.

With
pad-map=3,0,1,2,-1,-1,18,19,20,21,6,7,10,4,5,8,9,-1,18,19,20,21
all buttons work fine
vit9696
Администратор
Posts: 1767
Joined: 24 Feb 2015, 00:48
Gender: Male

Re: Remapping XInput xbox 360 gamepad

Post by vit9696 »

Ah, did not notice you had the first four confused as well, yes, that is right.
Post Reply