summaryrefslogtreecommitdiff
path: root/src/setup
diff options
context:
space:
mode:
authorSimon Howard2014-05-03 23:18:21 -0400
committerSimon Howard2014-05-03 23:18:21 -0400
commitf56a8ac302a9ef2f5ff668d13f20cb4bb787fab0 (patch)
treeff297cfed06b124ef8d7c97951ae3ba6a7711a7c /src/setup
parent930eae1c242daabda3668532e0638f5d19c65ed8 (diff)
downloadchocolate-doom-f56a8ac302a9ef2f5ff668d13f20cb4bb787fab0.tar.gz
chocolate-doom-f56a8ac302a9ef2f5ff668d13f20cb4bb787fab0.tar.bz2
chocolate-doom-f56a8ac302a9ef2f5ff668d13f20cb4bb787fab0.zip
setup: Fix disabling of joystick button bindings.
When setting a joystick button binding to -1 to disable it, set it directly; do not go through to the physical button mapping layer. Also add a quick note to encourage users to send in details of their gamepads.
Diffstat (limited to 'src/setup')
-rw-r--r--src/setup/joystick.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/setup/joystick.c b/src/setup/joystick.c
index f0c65780..725cc287 100644
--- a/src/setup/joystick.c
+++ b/src/setup/joystick.c
@@ -239,6 +239,7 @@ static const known_joystick_t *GetJoystickType(int index)
printf("Unknown joystick '%s' with %i axes, %i buttons, %i hats\n",
name, axes, buttons, hats);
+ printf("Please consider sending in details about your gamepad!\n");
return NULL;
}
@@ -270,7 +271,7 @@ static void LoadConfigurationSet(const joystick_config_t *configs)
}
// For buttons, set the virtual button mapping as well.
- if (M_StringStartsWith(config->name, "joyb_"))
+ if (M_StringStartsWith(config->name, "joyb_") && config->value >= 0)
{
joystick_physical_buttons[button] = config->value;
M_snprintf(buf, sizeof(buf), "%i", button);