From c09aab491b1d28d52520e74bc6a40b8e57d288b0 Mon Sep 17 00:00:00 2001 From: Kp Date: Sun, 24 Dec 2017 00:28:35 +0000 Subject: [PATCH] Fix max_buttons_per_joystick=0 max_hats_per_joystick!=0 build Internally, hats are treated as a group of 4 buttons. Disabling all buttons while not disabling all hats caused a build error. Since no one reported this, this configuration is likely not used. Make the simple fix of coercing max_hats_per_joystick to 0 when max_axes_per_joystick is 0. --- SConstruct | 2 ++ 1 file changed, 2 insertions(+) diff --git a/SConstruct b/SConstruct index 1d3962f21..578eed4b6 100644 --- a/SConstruct +++ b/SConstruct @@ -1149,6 +1149,8 @@ static void terminate_handler() # disabled, then disable joystick support. if not (user_settings.max_axes_per_joystick or user_settings.max_buttons_per_joystick or user_settings.max_hats_per_joystick): user_settings.max_joysticks = 0 + elif not user_settings.max_buttons_per_joystick: + user_settings.max_hats_per_joystick = 0 else: # If joysticks are disabled, then disable all possible # inputs.