It seems that every time a friend comes over to play games on RetroPie, they invariably screw up the controller settings somehow. Sometimes they'll accidentally press [any] button when a game is loading, panic, and then change the controller settings for a specific ROM. Other times, they'll plug a new controller in and map it incorrectly.

Suddenly, you can't even use the controller to navigate the RetroPie interface correctly. Either way, resetting controller settings for a specific ROM or controller often requires SSHing into the Pi, pulling out the old keyboard, or hoping another controller will work. Not anymore!

Now you can reset all controls, restoring RetroArch/EmulationStation controller mappings to default, with the press of a physical button. :)

How it works

In a nutshell, a normally open (NO) button is connected to the Pi's 40-pin GPIO header. When pressed, it triggers a script that removes your existing controller configuration/mapping files and reboots your Pi. When the Pi reboots, the controller configuration prompt will reappear and all ROM controller configurations will have reset. Nice!

Note: This is meant to be a fun, novel project; there are many other ways to handle and backup your controller configurations.