Dualshock 3 controller doesn't work in retroarch

hi!,I bought a new controller just since the old one had broken, I put it in the USB plug started retroarch, everything worked, just started a game I realized that the right keys worked (jump, shoot, etc.) input directional texts instead no, I tried to reconfigure everything on retroarch but there was no way to make it work, is it a retroarch bug? I tried the same controller on a single emulator and it works perfectly.