From f56a8ac302a9ef2f5ff668d13f20cb4bb787fab0 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Sat, 3 May 2014 23:18:21 -0400 Subject: 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. --- src/setup/joystick.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') 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); -- cgit v1.2.3