The unfortunate history of action buttons

Button 1 is B. Button 2 is A.

Ok, I get it. There’s a history of why that is. But now extend that to the MAME core menu UI and Select = B and UI Back = A ? and even worse Select = Backspace and Back = Enter ? … enough already!

So, you’d think there would be an obvious or simple way to make that right! I understand that the buttons can be custom mapped at many levels (there’s even a swap option in the RetroArch UI) but none of that seems to help me with my very specific use case.

I’m using a Pi5, the latest RetroPie/RetroArch/EmulationStation with both lr-mame and a StickFreaks build of the MAME standalone. This configuration is not set in stone but I like how lr-mame performs on the Pi5 (even with a shader) and standalone mame (+ extras) is great as a reference. If I could just get these 2 frontends to cooperate…

I think I need to debug the “experimental” lr-mame code or add a feature to fix this… can someone help me get started? (I am an old-school C/C++ desktop/cross-platform dev)

it shouldn’t require any programming, just config stuff, but if you really want to get into it that way, I believe it’s going to be in the large and labyrinthine input/input_driver.c (https://github.com/libretro/RetroArch/blob/master/input/input_driver.c)