N64 USB controller not working properly

I’m running retroarch on windows 10, I bought a n64 controller to use for it. It works properly in the menu, but when I load a game, the controller isn’t mapped properly. As far as I can tell, the only problem is that the A button isn’t being recognized and the B button is registering as the A button. I tried playing around with mapping the controller, but I’m new to all this so I don’t really know what I’m doing. Any help I can get would be greatly appreciated. These are the controllers I bought, if it matters: https://www.amazon.ca/Classic-Nintendo-Controller-kiwitatá-Raspberry/dp/B073J4V8NT/ref=mp_s_a_1_5?ie=UTF8&qid=1540431156&sr=8-5&pi=AC_SX236_SY340_QL65&keywords=usb+n64+controller&dpPl=1&dpID=51aCW0y--LL&ref=plSrch

I am having this same issue. There are other threads also with the same issue but no fixes posted in them. I have https://www.amazon.com/gp/product/B074SDX7BQ/

A button isn’t working B button is bound to A

In some of the game menus you have to completely close the game cause you can’t get back at all. Need to fix the mapping or set up some how but haven’t been able to figure it out. Want to use the usb n64 controller on n64 games and have it mapped just for n64 games

I did some more looking online, and I managed to find a solution, however I ran into another problem. If you go to input config in settings, set the a button on the controller to the “b button”, the b button to "y button, and c down to “a button”. I tried it and it worked like a charm, however I found that after I fixed it, when I tried testing my snes controller, none of 4 buttons (A B X and Y) seemed to work, although the d pad and the shoulder buttons seemed to work. I think this is because i changed the button config with the n64 controller, but I haven’t figured out configuring a second controller. If you have a 2nd controller you might run into the same problem. Here’s the snes controller I have

The issue with the N64 pad is that someone submitted an autoconfig profile that presumably worked for their pad but doesn’t work for yours, but yours is getting detected as that same pad (this is common among cheap Chinese knockoff pads, as they reuse vendor IDs and product IDs [vid/pid] that RetroArch uses to identify pads)

What we need to fix it is for someone to delete that existing profile from their system and create a new one that has the proper mapping and submit it to the autoconfig repo (https://github.com/libretro/retroarch-joypad-autoconfig).