Just got my raspberry pi today and I am having this issue as well, but it seems to be with all emulators (I have only tested NES/SNES so far though). Dpad is not working in any of the games I have tried, but the other buttons seem to be ok. When setting the controller up in the settings, all of the buttons seem to be recognized, except when I press the L2 button it adds it as L2 and R2 in the config settings as soon as I press it. But the main issue is that the dpad isn’t working; it’s unplayable without that.
I am using the Dual Shock 4 / PS4 controller with a USB cable if that matters.