Hey.
You must not change your button layout in opt/retropie/configs/all/retroarch.cfg
This is not how it supposed to be.
You have to change it directly in the controller config file itself (for example: “/opt/retropie/emulators/retroarch/configs/XboxGamepad(userspacedriver).cfg”)
Retroarch will recognize and detect your controller when you start a game so you have to specify the config of the controller itself to let it work properly.
One problem that you also might have is that your SNES-Controller is detected as player 1, which would also explain, why nothing works as you want.
Luckily I have the exact same setup and had the same problem but I could solve it. (I just guess that you want your Xbox 360 Controller always as player 1, right?)
You can check this thread out, where I go more into detail:
http://blog.petrockblock.com/forums/topic/how-can-i-change-the-p2-controller-to-player-1/
If you have any more question or if I wasn’t clear enough don’t hesitate to ask.
Edit: And you should definitly check out Floobs youtube channel. His videos might be long but he’s a very good teacher and after that you should know everything that you need.
https://www.youtube.com/channel/UCdSu9Y0xAyY8V77vj6mQ-0g