summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSimon Howard2015-04-12 02:19:44 +0000
committerSimon Howard2015-04-12 02:19:44 +0000
commit95a7160ca80c21057ecfe72fdba4a2dd977223e3 (patch)
treeca50f0e6a51b40bb572d5a7650daba4fb0503e94 /src
parent710e963acad611dfd1c5780d9f68f6ef91e93a22 (diff)
downloadchocolate-doom-95a7160ca80c21057ecfe72fdba4a2dd977223e3.tar.gz
chocolate-doom-95a7160ca80c21057ecfe72fdba4a2dd977223e3.tar.bz2
chocolate-doom-95a7160ca80c21057ecfe72fdba4a2dd977223e3.zip
setup: Add config for USB Gameport adapter.
This configuration supports the "Super Joy Box 7" USB gameport adapter, for people using old PC gameport joysticks / gamepads. The button configuration matches the original Vanilla configuration, for authenticity.
Diffstat (limited to 'src')
-rw-r--r--src/setup/joystick.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/setup/joystick.c b/src/setup/joystick.c
index 7f52c65d..dbd7815c 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -294,6 +294,24 @@ static const joystick_config_t buffalo_classic_controller[] =
{NULL, 0},
};
+// Config for if the user is actually using an old PC joystick or gamepad,
+// probably via a USB-Gameport adapter.
+static const joystick_config_t pc_gameport_controller[] =
+{
+ {"joystick_x_axis", 0},
+ {"joystick_y_axis", 1},
+ // Button configuration is the default as used for Vanilla Doom,
+ // Heretic and Hexen. When playing with a Gravis Gamepad, this
+ // layout should also be vaguely similar to the standard layout
+ // described above.
+ {"joyb_fire", 0},
+ {"joyb_strafe", 1},
+ {"joyb_use", 3},
+ {"joyb_speed", 2},
+ {NULL, 0},
+};
+
+
static const known_joystick_t known_joysticks[] =
{
{
@@ -359,6 +377,18 @@ static const known_joystick_t known_joysticks[] =
6, 14, 1,
ps4_ds4_controller,
},
+
+ // This is the configuration for the USB-Gameport adapter listed on
+ // this page as the "Mayflash USB to Gameport Adapter" (though the
+ // device is labeled as "Super Joy Box 7"):
+ // https://sites.google.com/site/joystickrehab/itemcatal
+ // TODO: Add extra configurations here for other USB-Gameport adapters,
+ // which should just be the same configuration.
+ {
+ "WiseGroup.,Ltd Gameport to USB Controller",
+ 3, 8, 1,
+ pc_gameport_controller,
+ },
};
static const known_joystick_t *GetJoystickType(int index)