summaryrefslogtreecommitdiffstats
path: root/src/input_common/main.h
diff options
context:
space:
mode:
authorgerman <german@thesoftwareartisans.com>2020-09-05 04:48:03 +0200
committergerman <german@thesoftwareartisans.com>2020-09-05 04:48:03 +0200
commitff679f3d171ace12d1b3b68f305b1bb24b2130de (patch)
tree67cd6da1b1ef1e7b817ffd82cc8606ace6da779e /src/input_common/main.h
parentMerge pull request #4629 from Morph1984/mergesinglejoyasdualjoy-impl (diff)
downloadyuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.gz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.bz2
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.lz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.xz
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.tar.zst
yuzu-ff679f3d171ace12d1b3b68f305b1bb24b2130de.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/main.h10
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 {
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<Settings::NativeAnalog::Values, Common::ParamPackage>;
using ButtonMapping = std::unordered_map<Settings::NativeButton::Values, Common::ParamPackage>;
+using MotionMapping = std::unordered_map<Settings::NativeMotion::Values, Common::ParamPackage>;
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();