summaryrefslogtreecommitdiff
path: root/setup/joystick.c
diff options
context:
space:
mode:
authorSimon Howard2010-08-09 17:53:10 +0000
committerSimon Howard2010-08-09 17:53:10 +0000
commitf3d3b03870a6842e104c67ce6fc7edfde89d77ec (patch)
treee826ee27d68eef429854a1894f30f02b33b093eb /setup/joystick.c
parentf291db8f1456b9d1be47eae0ac34bcf0546ce151 (diff)
downloadchocolate-doom-f3d3b03870a6842e104c67ce6fc7edfde89d77ec.tar.gz
chocolate-doom-f3d3b03870a6842e104c67ce6fc7edfde89d77ec.tar.bz2
chocolate-doom-f3d3b03870a6842e104c67ce6fc7edfde89d77ec.zip
Add weapon cycling bindings for mouse and joystick buttons. Add weapon
cycling bindings to configuration file and setup tool. Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1953
Diffstat (limited to 'setup/joystick.c')
-rw-r--r--setup/joystick.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/setup/joystick.c b/setup/joystick.c
index 867fa5c2..825cd8b5 100644
--- a/setup/joystick.c
+++ b/setup/joystick.c
@@ -50,6 +50,8 @@ int joybuse = 2;
int joybspeed = 3;
int joybstrafeleft = -1;
int joybstraferight = -1;
+int joybprevweapon = -1;
+int joybnextweapon = -1;
// Joystick to use, as an SDL joystick index:
@@ -430,6 +432,8 @@ void ConfigJoystick(void)
AddJoystickControl(button_table, "Strafe Left", &joybstrafeleft);
AddJoystickControl(button_table, "Strafe Right", &joybstraferight);
+ AddJoystickControl(button_table, "Previous weapon", &joybprevweapon);
+ AddJoystickControl(button_table, "Next weapon", &joybnextweapon);
TXT_SignalConnect(joystick_button, "pressed", CalibrateJoystick, NULL);
TXT_SignalConnect(window, "closed", JoystickWindowClosed, NULL);