I have done the exact same thing. retro pi picks up the two gamepad (which is cool). I configure p1 and then OK. when I play a FBA game player 1 is all perfect with the controller. Then I go back and configure gamepad 2. I set it all up .
Then I goto FBA and P1 is all cotrols are in the oppoiste direction. And all the buttons are wrong (for SF2 Hard punch and hard kick are gone). But P2 is all perfect.
So I goto retroarch and i check P1 and P2 . P1 has been configured for Xin Mo #1 and P2 has been configured for Xin Mo #2.
However in mame-advance everything is all perfect.
Any idea