diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-10-20 19:55:25 +0200 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-11-16 05:33:20 +0100 |
commit | e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd (patch) | |
tree | 344b40a5a874cb188c6e7aa7d1622c77a215090d /src/input_common/settings.h | |
parent | configure_input: Add per-player vibration (diff) | |
download | yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.gz yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.bz2 yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.lz yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.xz yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.tar.zst yuzu-e9e1876e821b8bd1bb5c8254ec93e2cc479e16dd.zip |
Diffstat (limited to 'src/input_common/settings.h')
-rw-r--r-- | src/input_common/settings.h | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/src/input_common/settings.h b/src/input_common/settings.h index 2763ed991..75486554b 100644 --- a/src/input_common/settings.h +++ b/src/input_common/settings.h @@ -66,17 +66,32 @@ constexpr int NUM_STICKS_HID = NumAnalogs; extern const std::array<const char*, NumAnalogs> mapping; } // namespace NativeAnalog +namespace NativeVibration { +enum Values : int { + LeftVibrationDevice, + RightVibrationDevice, + + NumVibrations, +}; + +constexpr int VIBRATION_HID_BEGIN = LeftVibrationDevice; +constexpr int VIBRATION_HID_END = NumVibrations; +constexpr int NUM_VIBRATIONS_HID = NumVibrations; + +extern const std::array<const char*, NumVibrations> mapping; +}; // namespace NativeVibration + namespace NativeMotion { enum Values : int { - MOTIONLEFT, - MOTIONRIGHT, + MotionLeft, + MotionRight, NumMotions, }; -constexpr int MOTION_HID_BEGIN = MOTIONLEFT; +constexpr int MOTION_HID_BEGIN = MotionLeft; constexpr int MOTION_HID_END = NumMotions; -constexpr int NUM_MOTION_HID = NumMotions; +constexpr int NUM_MOTIONS_HID = NumMotions; extern const std::array<const char*, NumMotions> mapping; } // namespace NativeMotion @@ -305,9 +320,11 @@ constexpr int NUM_KEYBOARD_MODS_HID = NumKeyboardMods; } // namespace NativeKeyboard -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 ButtonsRaw = std::array<std::string, NativeButton::NumButtons>; +using MotionsRaw = std::array<std::string, NativeMotion::NumMotions>; +using VibrationsRaw = std::array<std::string, NativeVibration::NumVibrations>; + using MouseButtonsRaw = std::array<std::string, NativeMouseButton::NumMouseButtons>; using KeyboardKeysRaw = std::array<std::string, NativeKeyboard::NumKeyboardKeys>; using KeyboardModsRaw = std::array<std::string, NativeKeyboard::NumKeyboardMods>; @@ -330,7 +347,8 @@ struct PlayerInput { ControllerType controller_type; ButtonsRaw buttons; AnalogsRaw analogs; - MotionRaw motions; + VibrationsRaw vibrations; + MotionsRaw motions; bool vibration_enabled; int vibration_strength; |