ref: 95a7160ca80c21057ecfe72fdba4a2dd977223e3
parent: 710e963acad611dfd1c5780d9f68f6ef91e93a22
author: Simon Howard <[email protected]>
date: Sat Apr 11 22:19:44 EDT 2015
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.
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -294,6 +294,24 @@
{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[] =
{
{
@@ -358,6 +376,18 @@
"Wireless Controller",
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,
},
};