you could try editing this manually – removing
input_l2_axis = "+2"
input_r2_axis = "+5"
input_r_x_plus_axis = "-4"
input_r_x_minus_axis = "-4"
input_r_y_plus_axis = "-4"
input_r_y_minus_axis = "-4"
and see if that helps – or cut it down even more with just directions and ab xy –
also please post /opt/retropie/configs/all/retroarch.cfg