VOGONS


First post, by TeaRex

User metadata
Rank Member
Rank
Member

Hello,

I have two joysticks attached to my Linux PC (64-bit openSUSE 10.3), one digital on USB as /dev/input/js0 and one analog on an old-style game port as /dev/input/js1.

Is there a way to get DOSBox (unmodified current CVS) and/or SDL (SDL 1.2.12-26 from the distro) to "see" only one or the other of these, or at least to select which one should be "seen" as the first joystick? As you all know, most DOS games support only one stick, and I'd like to be able to select the one that works best for each game. Do I do this with the keymapper? Or is there some other way? Thank you for any help!

tearex

Reply 1 of 5, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

I have no idea. Maybe there is some SDL-environment variable to select a certain joystick?

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 2 of 5, by MiniMax

User metadata
Rank Moderator
Rank
Moderator

There is something in the SDL code that allows a user to choose a specific joystick, but it appears to be in a Linux specific part of the SDL:

        /* First see if the user specified a joystick to use */
if ( SDL_getenv("SDL_JOYSTICK_DEVICE") != NULL ) {
SDL_strlcpy(path, SDL_getenv("SDL_JOYSTICK_DEVICE"), sizeof(path));
if ( stat(path, &sb) == 0 ) {
fd = open(path, O_RDONLY, 0);

DOSBox 60 seconds guide | How to ask questions
_________________
Lenovo M58p | Core 2 Quad Q8400 @ 2.66 GHz | Radeon R7 240 | LG HL-DT-ST DVDRAM GH40N | Fedora 32

Reply 3 of 5, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

4axis_2 (supports one joystick, second joystick used)

Reply 4 of 5, by TeaRex

User metadata
Rank Member
Rank
Member

Erm.. I guess being able to read is an advantage. Point taken. 🙁

tearex

Reply 5 of 5, by wd

User metadata
Rank DOSBox Author
Rank
DOSBox Author

😀
Well it's only for the 4axis thing, if you want to swap the 2axis joysticks
(for whatever reason) you have to remap everything using the mapper.