[SOLVED] Gamepad mapping
Posted: Sun Mar 06, 2022 5:32 pm
I am using two joysticks. The first one works perfectly, but the second I'm not having any luck (JOY2 / PS3USB) below.
Using jstest outside of the game I can confirm both joysticks work fine. Buttons are mapped the same as well. But in love, i can't seem to get anything to work besides recognizing that it exists.
I tried to figure out get/set GamepadMapping, but not making any progress. I even tried "get" from one joystick, as input to the other.
So far i've found the love documentation to be excellent, but it really falls short on joysticks. There are nice verbose examples for most things i've looked into, but for joysticks it's rough. There is also more outdated docs then new, so i keep finding myself on irrelevant pages.
That said I should mention I'm on Love 11.4.
Any code examples of how to deal with this? I'm assuming it's because this controller isn't found in some internal index. Any help appreciated.
output from the start of my game.
Using jstest outside of the game I can confirm both joysticks work fine. Buttons are mapped the same as well. But in love, i can't seem to get anything to work besides recognizing that it exists.
I tried to figure out get/set GamepadMapping, but not making any progress. I even tried "get" from one joystick, as input to the other.
So far i've found the love documentation to be excellent, but it really falls short on joysticks. There are nice verbose examples for most things i've looked into, but for joysticks it's rough. There is also more outdated docs then new, so i keep finding myself on irrelevant pages.
That said I should mention I'm on Love 11.4.
Any code examples of how to deal with this? I'm assuming it's because this controller isn't found in some internal index. Any help appreciated.
output from the start of my game.
Code: Select all
Registering "Mad Catz Wired Xbox 360 Controller"" as "JOY1"
Registering "PS3/USB Cordless Gamepad"" as "JOY2"
{
['JOY2'] = {
['device'] = 'Joystick: 0x558d31759d20',
['description'] = 'PS3/USB Cordless Gamepad'
},
['JOY1'] = {
['device'] = 'Joystick: 0x558d31760bd0',
['description'] = 'Mad Catz Wired Xbox 360 Controller'
},
['KEY1'] = {
['description'] = 'Keyboard, Using Up, Down, Left, Right keys'
},
['KEY2'] = {
['description'] = 'Keyboard: Using W, A, S, D keys'
}
}