@meleu Thank you for your response. I will try that version.
Even though that solution can help me, I would like to know if anyone has experienced the same issue with the second joystick in Mame4all. There should be a lot of gamers using two arcade joysticks connected to a Raspberry.
It is like there is no driver for the second stick (remember that the buttons work fine) only in Mame4all, since it works perfectly in all emulators, including Advance Mame. It seems incredible, but I promise that's how it is.
Thanks