diff options
| author | 2020-09-04 21:48:03 -0500 | |
|---|---|---|
| committer | 2020-09-04 21:48:03 -0500 | |
| commit | ff679f3d171ace12d1b3b68f305b1bb24b2130de (patch) | |
| tree | 67cd6da1b1ef1e7b817ffd82cc8606ace6da779e /src/input_common/main.h | |
| parent | Merge pull request #4629 from Morph1984/mergesinglejoyasdualjoy-impl (diff) | |
| download | yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.gz yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.xz yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.zip | |
Include HID and configuration changes related to motion
Diffstat (limited to 'src/input_common/main.h')
| -rw-r--r-- | src/input_common/main.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/input_common/main.h b/src/input_common/main.h index f3fbf696e..18f44dcc3 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h | |||
| @@ -21,10 +21,14 @@ namespace Settings::NativeButton { | |||
| 21 | enum Values : int; | 21 | enum Values : int; |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | namespace Settings::NativeMotion { | ||
| 25 | enum Values : int; | ||
| 26 | } | ||
| 27 | |||
| 24 | namespace InputCommon { | 28 | namespace InputCommon { |
| 25 | namespace Polling { | 29 | namespace Polling { |
| 26 | 30 | ||
| 27 | enum class DeviceType { Button, AnalogPreferred }; | 31 | enum class DeviceType { Button, AnalogPreferred, Motion }; |
| 28 | 32 | ||
| 29 | /** | 33 | /** |
| 30 | * A class that can be used to get inputs from an input device like controllers without having to | 34 | * A class that can be used to get inputs from an input device like controllers without having to |
| @@ -59,6 +63,7 @@ class MotionEmu; | |||
| 59 | */ | 63 | */ |
| 60 | using AnalogMapping = std::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>; | 64 | using AnalogMapping = std::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>; |
| 61 | using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>; | 65 | using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>; |
| 66 | using MotionMapping = std::unordered_map<Settings::NativeMotion::Values, Common::ParamPackage>; | ||
| 62 | 67 | ||
| 63 | class InputSubsystem { | 68 | class InputSubsystem { |
| 64 | public: | 69 | public: |
| @@ -103,6 +108,9 @@ public: | |||
| 103 | /// Retrieves the button mappings for the given device. | 108 | /// Retrieves the button mappings for the given device. |
| 104 | [[nodiscard]] ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& device) const; | 109 | [[nodiscard]] ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& device) const; |
| 105 | 110 | ||
| 111 | /// Retrieves the motion mappings for the given device. | ||
| 112 | [[nodiscard]] MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& device) const; | ||
| 113 | |||
| 106 | /// Retrieves the underlying GameCube analog handler. | 114 | /// Retrieves the underlying GameCube analog handler. |
| 107 | [[nodiscard]] GCAnalogFactory* GetGCAnalogs(); | 115 | [[nodiscard]] GCAnalogFactory* GetGCAnalogs(); |
| 108 | 116 | ||