diff --git a/core/core_constants.cpp b/core/core_constants.cpp index f9b32da79e..dad1cc8955 100644 --- a/core/core_constants.cpp +++ b/core/core_constants.cpp @@ -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); diff --git a/core/input/input.cpp b/core/input/input.cpp index 4d32ddf8d7..e18a5b692c 100644 --- a/core/input/input.cpp +++ b/core/input/input.cpp @@ -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] = { diff --git a/core/input/input_enums.h b/core/input/input_enums.h index 27508cce46..b0bd154006 100644 --- a/core/input/input_enums.h +++ b/core/input/input_enums.h @@ -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. }; diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index c3a35e6adf..d5823a60fa 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2514,7 +2514,22 @@ Game controller SDL touchpad button. - + + Game controller SDL miscellaneous button. Used by Nintendo Switch 2 Pro Controller and Horipad Steam controllers. + + + Game controller SDL miscellaneous button. + + + Game controller SDL miscellaneous button. + + + Game controller SDL miscellaneous button. + + + Game controller SDL miscellaneous button. + + The number of SDL game controller buttons.