diff options
| author | bunnei <bunneidev@gmail.com> | 2020-09-17 12:39:01 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-09-17 12:39:01 -0700 |
| commit | 3f6d83b27cf3eb2e782185deeb852630037caa17 (patch) | |
| tree | febd2fb00d95ed955be4ed97acc9f4c21b2a5efa /src/input_common/settings.h | |
| parent | 382bf1faf42c1b8c6cf39398e5ba08177b9dd345 (diff) | |
| parent | 5b6268d26a178f8104c7075daf24df37147a202b (diff) | |
Merge pull request #4594 from german77/MotionHID
hid/configuration: Implement motion controls to HID
Diffstat (limited to 'src/input_common/settings.h')
| -rw-r--r-- | src/input_common/settings.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/input_common/settings.h b/src/input_common/settings.h index 2d258960b..ab0b95cf1 100644 --- a/src/input_common/settings.h +++ b/src/input_common/settings.h @@ -66,6 +66,21 @@ constexpr int NUM_STICKS_HID = NumAnalogs; extern const std::array<const char*, NumAnalogs> mapping; } // namespace NativeAnalog +namespace NativeMotion { +enum Values : int { + MOTIONLEFT, + MOTIONRIGHT, + + NumMotions, +}; + +constexpr int MOTION_HID_BEGIN = MOTIONLEFT; +constexpr int MOTION_HID_END = NumMotions; +constexpr int NUM_MOTION_HID = NumMotions; + +extern const std::array<const char*, NumMotions> mapping; +} // namespace NativeMotion + namespace NativeMouseButton { enum Values { Left, @@ -292,6 +307,7 @@ constexpr int NUM_KEYBOARD_MODS_HID = NumKeyboardMods; using ButtonsRaw = std::array<std::string, NativeButton::NumButtons>; using AnalogsRaw = std::array<std::string, NativeAnalog::NumAnalogs>; +using MotionRaw = std::array<std::string, NativeMotion::NumMotions>; using MouseButtonsRaw = std::array<std::string, NativeMouseButton::NumMouseButtons>; using KeyboardKeysRaw = std::array<std::string, NativeKeyboard::NumKeyboardKeys>; using KeyboardModsRaw = std::array<std::string, NativeKeyboard::NumKeyboardMods>; @@ -314,6 +330,7 @@ struct PlayerInput { ControllerType controller_type; ButtonsRaw buttons; AnalogsRaw analogs; + MotionRaw motions; std::string lstick_mod; std::string rstick_mod; |
