Ok,
I have this working fairly simply, although I have to say playing Maddog with a joystick is a whole different experience.
Firstly, you need to set the joystick buttons, details are in hypinput.ini file supplied in repo, but I will outline here:
Remember hypseus uses SDL2 keycodes, so porting previous Daphne configs won't work:
SDL2 keycodes are here: https://github.com/DirtBagXon/hypseus-singe/blob/master/doc/keylist.txt
To figure what joystick button to program:
jstest /dev/input/js0
Minimal config for Maddog:
| [KEYBOARD] |
| ... |
| KEY_COIN1 = 53 0 7 |
| KEY_START1 = 49 0 8 |
| KEY_BUTTON1 = 1073742048 0 3 <- Reload |
| KEY_BUTTON3 = 32 0 1 <- Shoot |
| KEY_QUIT = 27 0 4 |
| ... |
| END |
Joystick config:
# The third number is the joystick button code (or 0 for "none")
# Since 0 is reserved for special meaning, joystick button 0 is
# identified as 1 here. Button 1 is identified as 2, and so on.
That deals with the buttons, so to the axis:
There are a few routes but this was most simplistic, using qJoypad:
apt-get install qjoypad
Then a simple config to map joystick movement to mouse movement:
cat .qjoypad3/SINGE.lyt
Joystick 1 {
Axis 1: gradient, maxSpeed 10, mouse+h
Axis 2: gradient, maxSpeed 10, mouse+v
}
Load and daemon'ize on game startup with:
qjoypad -t SINGE