[xinput] how to prevent /dev/input/js0 to be created ?

Greetings !!

I got a very problematic issue concerning the “azrock led controller” that couldn’t be disabled in bIOS and that is taken as a joystick pointing always in the upper left in all emulators that could be controlled by a joystick (mgba, dolphin, …).

My aim is to disable it definitely at boot.

I read lot of forums posts and documentations, I tried to set out the source code concerning the joystick detection but each time the application is upgraded I have to do so as there is no switch to tell the compiler to do not compile controllers handling.

I really don’t know how to do… it is seemly udev that could help me, but joystick detection is done by X (cf xinput) at a higher level.
mGba and dolphin are using X/SDL to handle the input controllers. (sdl-events.c for mgba).

Is there a way to do it using udev (that i really have problem to understand and work with because all I tried using udev failed ^^ ) to blacklist /dev/input/js0 from the inputs ?
Or is there a way to blacklist “azrock led controller” as a joystick ?

with xinput --disable it doesn’t work, the led controller is always in the list with the same id as the one disabled.

the only way I found is to do rm -f /dev/input/js0 but neither mgba or dolphin are following the fact the /dev/input/js0 doesn’t exists because they are emulating a edev system file or something similar.

I commented the whole mSDLInitEvents() function in mgba and it works, but each time the crew will update the application I would have to remember to set the whole content except the “return true” in this function :{