diff options
Diffstat (limited to 'src/core/frontend/input.h')
-rw-r--r-- | src/core/frontend/input.h | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/src/core/frontend/input.h b/src/core/frontend/input.h index de51a754e..88ebc6497 100644 --- a/src/core/frontend/input.h +++ b/src/core/frontend/input.h @@ -21,6 +21,11 @@ enum class AnalogDirection : u8 { UP, DOWN, }; +struct AnalogProperties { + float deadzone; + float range; + float threshold; +}; /// An abstract class template for an input device (a button, an analog input, etc.). template <typename StatusType> @@ -30,6 +35,12 @@ public: virtual StatusType GetStatus() const { return {}; } + virtual StatusType GetRawStatus() const { + return GetStatus(); + } + virtual AnalogProperties GetAnalogProperties() const { + return {}; + } virtual bool GetAnalogDirectionStatus([[maybe_unused]] AnalogDirection direction) const { return {}; } @@ -163,10 +174,11 @@ using MotionStatus = std::tuple<Common::Vec3<float>, Common::Vec3<float>, Common using MotionDevice = InputDevice<MotionStatus>; /** - * A touch status is an object that returns a tuple of two floats and a bool. The floats are - * x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is pressed. + * A touch status is an object that returns an array of 16 tuple elements of two floats and a bool. + * The floats are x and y coordinates in the range 0.0 - 1.0, and the bool indicates whether it is + * pressed. */ -using TouchStatus = std::tuple<float, float, bool>; +using TouchStatus = std::array<std::tuple<float, float, bool>, 16>; /** * A touch device is an input device that returns a touch status object |