Controller input mapping works in Emulation Station but not in emulators
-
@mitu
yes it's solved by now, but I am interested in how to solve it for the future and what is causing this +2 shift. If you are not willing to further support, I fully unterstand. It's more my personal interest to find and solve the bug so others don't have this problems.
I was googling a while to find it out, even I am not a beginner (in linux). -
@mcpat said in Controller input mapping works in Emulation Station but not in emulators:
If you are not willing to further support, I fully unterstand.
I would if I could :).
-
@mitu
I solved the problem. It was in the source code of hid-nx....see here. It was the BTN_0 and BTN_1
I modified the code like this for both controllers and they are now working correctly!
Can be found starting here
static const struct nx_con_button_mapping gencon_button_mappings[] = { { BTN_SOUTH, NX_CON_BTN_A, }, { BTN_EAST, NX_CON_BTN_B, }, { BTN_WEST, NX_CON_BTN_R, }, { BTN_DPAD_LEFT, NX_CON_BTN_X, }, { BTN_DPAD_UP, NX_CON_BTN_Y, }, { BTN_DPAD_RIGHT, NX_CON_BTN_L, }, { BTN_THUMBL, NX_CON_BTN_ZR, }, { BTN_START, NX_CON_BTN_PLUS, }, { BTN_SELECT, NX_CON_BTN_HOME, }, { BTN_MODE, NX_CON_BTN_CAP, }, { /* sentinel */ }, }; /* * N64's C buttons get assigned to d-pad directions and registered as buttons. */ static const struct nx_con_button_mapping n64con_button_mappings[] = { { BTN_A, NX_CON_BTN_A, }, { BTN_B, NX_CON_BTN_B, }, { BTN_Z, NX_CON_BTN_ZL, }, { BTN_TL, NX_CON_BTN_L, }, { BTN_TR, NX_CON_BTN_R, }, { BTN_TR2, NX_CON_BTN_LSTICK, }, { BTN_START, NX_CON_BTN_PLUS, }, { BTN_DPAD_UP, NX_CON_BTN_Y, }, { BTN_DPAD_DOWN, NX_CON_BTN_ZR, }, { BTN_DPAD_LEFT, NX_CON_BTN_X, }, { BTN_DPAD_RIGHT, NX_CON_BTN_MINUS, }, { BTN_THUMBL, NX_CON_BTN_HOME, }, { BTN_MODE, NX_CON_BTN_CAP, }, { /* sentinel */ }, };
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.