joystick works for me on FreeBSD 12.1 using SDL. I was getting "no joystick found" although attached on /dev/input/event7 and /dev/input/js0, however I noticed the device was owned by webcamd user/group with 660 permissions. I think you can set up a devd rule but I added myself to the "webcamd" group and the joystick works. It's a USB M$ Xbox controller. I've been able to use it in SDL like this:
ref: https://wiki.libsdl.org/SDL_JoystickOpen
C:
...
SDL_Joystick* joy = NULL;
SDL_InitSubSystem(SDL_INIT_JOYSTICK);
if ( SDL_NumJoysticks() > 0 )
joy = SDL_JoystickOpen( 0 );
SDL_Event e;
handleEvent(e)
if( e.type == SDL_JOYAXISMOTION )
{
if( e.jaxis.which == 0 )
{
if( e.jaxis.axis == 3 ) //x
...