From ff679f3d171ace12d1b3b68f305b1bb24b2130de Mon Sep 17 00:00:00 2001 From: german Date: Fri, 4 Sep 2020 21:48:03 -0500 Subject: Include HID and configuration changes related to motion --- src/input_common/main.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/input_common/main.h') 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 { enum Values : int; } +namespace Settings::NativeMotion { +enum Values : int; +} + namespace InputCommon { namespace Polling { -enum class DeviceType { Button, AnalogPreferred }; +enum class DeviceType { Button, AnalogPreferred, Motion }; /** * A class that can be used to get inputs from an input device like controllers without having to @@ -59,6 +63,7 @@ class MotionEmu; */ using AnalogMapping = std::unordered_map; using ButtonMapping = std::unordered_map; +using MotionMapping = std::unordered_map; class InputSubsystem { public: @@ -103,6 +108,9 @@ public: /// Retrieves the button mappings for the given device. [[nodiscard]] ButtonMapping GetButtonMappingForDevice(const Common::ParamPackage& device) const; + /// Retrieves the motion mappings for the given device. + [[nodiscard]] MotionMapping GetMotionMappingForDevice(const Common::ParamPackage& device) const; + /// Retrieves the underlying GameCube analog handler. [[nodiscard]] GCAnalogFactory* GetGCAnalogs(); -- cgit v1.2.3 From 6ee8eab670acfed494ade355d77a32c57f7c9585 Mon Sep 17 00:00:00 2001 From: german Date: Fri, 4 Sep 2020 21:35:42 -0500 Subject: Add cemu hook changes related to PR #4609 --- src/input_common/main.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/input_common/main.h') diff --git a/src/input_common/main.h b/src/input_common/main.h index 18f44dcc3..dded3f1ef 100644 --- a/src/input_common/main.h +++ b/src/input_common/main.h @@ -54,6 +54,8 @@ public: class GCAnalogFactory; class GCButtonFactory; +class UDPMotionFactory; +class UDPTouchFactory; class Keyboard; class MotionEmu; @@ -123,6 +125,18 @@ public: /// Retrieves the underlying GameCube button handler. [[nodiscard]] const GCButtonFactory* GetGCButtons() const; + /// Retrieves the underlying udp motion handler. + [[nodiscard]] UDPMotionFactory* GetUDPMotions(); + + /// Retrieves the underlying udp motion handler. + [[nodiscard]] const UDPMotionFactory* GetUDPMotions() const; + + /// Retrieves the underlying udp touch handler. + [[nodiscard]] UDPTouchFactory* GetUDPTouch(); + + /// Retrieves the underlying udp touch handler. + [[nodiscard]] const UDPTouchFactory* GetUDPTouch() const; + /// Reloads the input devices void ReloadInputDevices(); -- cgit v1.2.3