I successfully replaced the line
in my config.txt file with
and now everything works perfectly! Thanks for the help @mitu
@ooskay Instead of bumping year(s) old topics, why don't you open a new topic, explaining what's your setup and what exactly do you want to do.
Update RetroPie-Setup script - it should now map escape to button x so you can quit. Although I still recommend a keyboard for RetroPie-Setup configuration.