1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

Add support for new SDL gamecontroller keywords.

This commit is contained in:
Marcel Admiraal
2021-02-07 16:12:51 +00:00
parent 9fb27eba8d
commit 3dd57a22df
6 changed files with 72 additions and 6 deletions

View File

@@ -1078,7 +1078,7 @@ void InputDefault::_get_mapped_hat_events(const JoyDeviceMapping &mapping, int p
}
// string names of the SDL buttons in the same order as input_event.h godot buttons
static const char *_joy_buttons[] = { "a", "b", "x", "y", "leftshoulder", "rightshoulder", "lefttrigger", "righttrigger", "leftstick", "rightstick", "back", "start", "dpup", "dpdown", "dpleft", "dpright", "guide", nullptr };
static const char *_joy_buttons[] = { "a", "b", "x", "y", "leftshoulder", "rightshoulder", "lefttrigger", "righttrigger", "leftstick", "rightstick", "back", "start", "dpup", "dpdown", "dpleft", "dpright", "guide", "misc1", "paddle1", "paddle2", "paddle3", "paddle4", "touchpad", nullptr };
static const char *_joy_axes[] = { "leftx", "lefty", "rightx", "righty", nullptr };
JoystickList InputDefault::_get_output_button(String output) {
@@ -1284,6 +1284,12 @@ static const char *_buttons[JOY_BUTTON_MAX] = {
"DPAD Down",
"DPAD Left",
"DPAD Right"
"Misc 1",
"Paddle 1",
"Paddle 2",
"Paddle 3",
"Paddle 4",
"Touchpad",
};
static const char *_axes[JOY_AXIS_MAX] = {