Thats not quite right, and as punishment you should watch this:
But in summary, the setup in RetroPie3 is (in terms of retroarch)
– First reads this file
– Which pulls in this file at the point of the #include line
– That file, in turn applies the auto detected controller file from
So in terms of controller settings, just edit what you want in the auto controller file. Then put your overrides as you have done in the system specific location.
A good rule of thumb, is to never alter the /all/retroarch.cfg unless you know you always want the rules in there to always apply, regardless of system or controller used. To be honest I hardly edit that file at all.
RetroPie help guides --> https://goo.gl/Yfy8kj
Please read this before asking for help --> http://goo.gl/eLErnl