Arcade stick recognized on RetroArch, not on MAME core

I tried going through the options on the MAME menu (the overlay one), but I found nothing within the input menu that spoke of selecting an input device, only pressing hotkeys. My DS4 is recognized on both RA and MAME, by the way.