input_common/sdl: add support for binding button to axis

This commit is contained in:
wwylele 2017-04-17 11:49:04 +03:00
parent 6a72bd62b5
commit 4ad82f2e5a
2 changed files with 59 additions and 4 deletions

View file

@ -19,7 +19,13 @@ const char* sdl2_config_file = R"(
# - "joystick": the index of the joystick to bind
# - "button"(optional): the index of the button to bind
# - "hat"(optional): the index of the hat to bind as direction buttons
# - "axis"(optional): the index of the axis to bind
# - "direction"(only used for hat): the direction name of the hat to bind. Can be "up", "down", "left" or "right"
# - "threshould"(only used for axis): a float value in (-1.0, 1.0) which the button is
# triggered if the axis value crosses
# - "direction"(only used for axis): "+" means the button is triggered when the axis value
# is greater than the threshold; "-" means the button is triggered when the axis value
# is smaller than the threshold
button_a=
button_b=
button_x=