If you want your X96mini to work with a wired USB Sony PS3 controller ( for games or navigation ) just do the following:
Download this driver: hid-sony.ko
Put it somewhere on your X96 mini
Open a terminal and issue the following commands:
If you don’t have a terminal program available get one from the play store.
The driver works with the stock ROM.
You will have to issue those commands each time you have restarted your system.
It might work with a PS4 Controller also, system navigation might need a .kl file added for the PS4 Controller.