Configure keys for a specific core

Is there a way to change the buttons only for a specific core? I’m using a bluetooth gamepad with a PS1-style layout, it works great with SNES or (of course) PS1, but when it comes to Sega consoles you would rather have another configuration especially when it doesn’t allow you to change inside the game. I tried unchecking global configuration but the button layout I set in the Retroarch menu is kept for all games, and I can’t seem to find a way to edit it in RGUI…

There is an option for core configs, which will let you load a different config file for each core. I’m not on top of the specifics, though, as it’s an option I don’t use personally.

That’s what I was trying to do, but when I switch to per-core configs changes made to button layout in Retroarch main menu (not the RGUI one) affect all cores at the same time. When I go in the input options in the RGUI and select “Configure All (Retropad)” it asks me to press buttons but it doesn’t do anything and it doesn’t even let me exit the RGUI through the back button, so I’m forced to close and reset Retroarch. Also I don’t have root permissions, so I can’t edit the .cfg files directly.