diff options
Diffstat (limited to 'src/input_common/main.h')
| -rw-r--r-- | src/input_common/main.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/src/input_common/main.h b/src/input_common/main.h index f3fbf696e..dded3f1ef 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 |
| @@ -50,6 +54,8 @@ public: | |||
| 50 | 54 | ||
| 51 | class GCAnalogFactory; | 55 | class GCAnalogFactory; |
| 52 | class GCButtonFactory; | 56 | class GCButtonFactory; |
| 57 | class UDPMotionFactory; | ||
| 58 | class UDPTouchFactory; | ||
| 53 | class Keyboard; | 59 | class Keyboard; |
| 54 | class MotionEmu; | 60 | class MotionEmu; |
| 55 | 61 | ||
| @@ -59,6 +65,7 @@ class MotionEmu; | |||
| 59 | */ | 65 | */ |
| 60 | using AnalogMapping = std::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>; | 66 | using AnalogMapping = std::unordered_map<Settings::NativeAnalog::Values, Common::ParamPackage>; |
| 61 | using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>; | 67 | using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>; |
| 68 | using MotionMapping = std::unordered_map<Settings::NativeMotion::Values, Common::ParamPackage>; | ||
| 62 | 69 | ||
| 63 | class InputSubsystem { | 70 | class InputSubsystem { |
| 64 | public: | 71 | public: |
| @@ -103,6 +110,9 @@ public: | |||
| 103 | /// Retrieves the button mappings for the given device. | 110 | /// Retrieves the button mappings for the given device. |
| 104 | [[nodiscard]] ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& device) const; | 111 | [[nodiscard]] ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& device) const; |
| 105 | 112 | ||
| 113 | /// Retrieves the motion mappings for the given device. | ||
| 114 | [[nodiscard]] MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& device) const; | ||
| 115 | |||
| 106 | /// Retrieves the underlying GameCube analog handler. | 116 | /// Retrieves the underlying GameCube analog handler. |
| 107 | [[nodiscard]] GCAnalogFactory* GetGCAnalogs(); | 117 | [[nodiscard]] GCAnalogFactory* GetGCAnalogs(); |
| 108 | 118 | ||
| @@ -115,6 +125,18 @@ public: | |||
| 115 | /// Retrieves the underlying GameCube button handler. | 125 | /// Retrieves the underlying GameCube button handler. |
| 116 | [[nodiscard]] const GCButtonFactory* GetGCButtons() const; | 126 | [[nodiscard]] const GCButtonFactory* GetGCButtons() const; |
| 117 | 127 | ||
| 128 | /// Retrieves the underlying udp motion handler. | ||
| 129 | [[nodiscard]] UDPMotionFactory* GetUDPMotions(); | ||
| 130 | |||
| 131 | /// Retrieves the underlying udp motion handler. | ||
| 132 | [[nodiscard]] const UDPMotionFactory* GetUDPMotions() const; | ||
| 133 | |||
| 134 | /// Retrieves the underlying udp touch handler. | ||
| 135 | [[nodiscard]] UDPTouchFactory* GetUDPTouch(); | ||
| 136 | |||
| 137 | /// Retrieves the underlying udp touch handler. | ||
| 138 | [[nodiscard]] const UDPTouchFactory* GetUDPTouch() const; | ||
| 139 | |||
| 118 | /// Reloads the input devices | 140 | /// Reloads the input devices |
| 119 | void ReloadInputDevices(); | 141 | void ReloadInputDevices(); |
| 120 | 142 | ||