Problem whith joypad

Hello, I’m new here and with the whole theme of retro consoles, sorry for my English.

I bought a pack of joystic, buttons and usb in amazon, to go testing I have mounted it in a box and I can not make it work. He recognizes me as DragonRise Inc. Generic USB Joystick, I have removed the autoconfig and configure manual I get the buttons and joystik to work well in the games but in the retroarch menu the joystic does not move me and I have to do it with a keyboard, in the menu the buttons do work for me. How can I make the joystic work in the retroarch menu?

I forgot, I use raspberry pi 4.

Edit: I had only tried mame 2003, I realized that with FB Alfa, the problem is the same, the buttons do work but the joystik does not work but works the keyboard direction keys, the same as in the retroarch menu. Any idea how to fix it? Greetings.