Merge pull request #116418 from oCHIKIo/master
Input: Add SDL `misc2`-`misc6` gamepad button constants
This commit is contained in:
@@ -549,6 +549,11 @@ void register_global_constants() {
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, PADDLE3);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, PADDLE4);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, TOUCHPAD);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MISC2);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MISC3);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MISC4);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MISC5);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MISC6);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, SDL_MAX);
|
||||
BIND_CORE_ENUM_CLASS_CONSTANT(JoyButton, JOY_BUTTON, MAX);
|
||||
|
||||
|
||||
@@ -66,6 +66,11 @@ static const char *_joy_buttons[(size_t)JoyButton::SDL_MAX] = {
|
||||
"paddle3",
|
||||
"paddle4",
|
||||
"touchpad",
|
||||
"misc2",
|
||||
"misc3",
|
||||
"misc4",
|
||||
"misc5",
|
||||
"misc6",
|
||||
};
|
||||
|
||||
static const char *_joy_axes[(size_t)JoyAxis::SDL_MAX] = {
|
||||
|
||||
@@ -100,7 +100,12 @@ enum class JoyButton {
|
||||
PADDLE3 = 18,
|
||||
PADDLE4 = 19,
|
||||
TOUCHPAD = 20,
|
||||
SDL_MAX = 21,
|
||||
MISC2 = 21,
|
||||
MISC3 = 22,
|
||||
MISC4 = 23,
|
||||
MISC5 = 24,
|
||||
MISC6 = 25,
|
||||
SDL_MAX = 26,
|
||||
MAX = 128, // Android supports up to 36 buttons. DirectInput supports up to 128 buttons.
|
||||
};
|
||||
|
||||
|
||||
@@ -2518,7 +2518,22 @@
|
||||
<constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButton">
|
||||
Game controller SDL touchpad button.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButton">
|
||||
<constant name="JOY_BUTTON_MISC2" value="21" enum="JoyButton">
|
||||
Game controller SDL miscellaneous button. Used by Nintendo Switch 2 Pro Controller and Horipad Steam controllers.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MISC3" value="22" enum="JoyButton">
|
||||
Game controller SDL miscellaneous button.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MISC4" value="23" enum="JoyButton">
|
||||
Game controller SDL miscellaneous button.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MISC5" value="24" enum="JoyButton">
|
||||
Game controller SDL miscellaneous button.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MISC6" value="25" enum="JoyButton">
|
||||
Game controller SDL miscellaneous button.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_SDL_MAX" value="26" enum="JoyButton">
|
||||
The number of SDL game controller buttons.
|
||||
</constant>
|
||||
<constant name="JOY_BUTTON_MAX" value="128" enum="JoyButton">
|
||||
|
||||
Reference in New Issue
Block a user