summaryrefslogtreecommitdiffstats
path: root/src/common/input.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-11 07:43:11 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commit06a5ef5874144a70e30e577a83ba68d1dad79e78 (patch)
tree867fa1153c7285c858cdb5bd7f60f08266532a88 /src/common/input.h
parentcore: Update input interpreter (diff)
downloadyuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.gz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.bz2
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.lz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.xz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.zst
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.zip
Diffstat (limited to '')
-rw-r--r--src/common/input.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/common/input.h b/src/common/input.h
index 6eefc55f9..3a28b77a7 100644
--- a/src/common/input.h
+++ b/src/common/input.h
@@ -38,6 +38,27 @@ enum class BatteryLevel {
Charging,
};
+enum class PollingMode {
+ Active,
+ Pasive,
+ Camera,
+ NCF,
+ IR,
+};
+
+enum class VibrationError {
+ None,
+ NotSupported,
+ Disabled,
+ Unknown,
+};
+
+enum class PollingError {
+ None,
+ NotSupported,
+ Unknown,
+};
+
struct AnalogProperties {
float deadzone{};
float range{1.0f};
@@ -149,6 +170,24 @@ private:
InputCallback callback;
};
+/// An abstract class template for an output device (rumble, LED pattern, polling mode).
+class OutputDevice {
+public:
+ virtual ~OutputDevice() = default;
+
+ virtual void SetLED([[maybe_unused]] LedStatus led_status) {
+ return;
+ }
+
+ virtual VibrationError SetVibration([[maybe_unused]] VibrationStatus vibration_status) {
+ return VibrationError::NotSupported;
+ }
+
+ virtual PollingError SetPollingMode([[maybe_unused]] PollingMode polling_mode) {
+ return PollingError::NotSupported;
+ }
+};
+
/// An abstract class template for a factory that can create input devices.
template <typename InputDeviceType>
class Factory {