30 Oct 2017, 22:16

Is there a way to configure the joystick device used by dosbox under Recalbox, ideally per game?

I know you can configure this in dosbox by setting the SDL env variable SDL_JOYSTICK_DEVICE to set the primary joystick device, e.g. using the /dev/input/by-id/usb-My_Old_Favorite_Analog_Stick-joystick... But I can't get this to work on Recalbox.

First problem is that I don't see an obvious place to put that setting for a certain game. Neither a config nor a shell script that is run per game where I could set it or whatever.

Then I found /usr/lib/python2.7/site-packages/configgen/generators/dosbox/dosboxGenerator.py[c] which sets some other SDL variable. Here I might at least set it globally, like:

    return Command.Command(videomode='default', array=commandArray, env={"SDL_JOYSTICK_DEVICE":"/dev/input/js1","SDL_VIDEO_GL_DRIVER":"/usr/lib/libGLESv2.so"})

But it seems to be ignored... it keeps always using /dev/input/js0.

Anyone an idea?