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.
This commit is contained in:
parent
44154f155a
commit
c09aab491b
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue