diff options
Diffstat (limited to 'include/input/InputDevice.h')
| -rw-r--r-- | include/input/InputDevice.h | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/include/input/InputDevice.h b/include/input/InputDevice.h index 57b659d9ee..7d8c19e702 100644 --- a/include/input/InputDevice.h +++ b/include/input/InputDevice.h @@ -115,6 +115,8 @@ enum class InputDeviceSensorAccuracy : int32_t { ACCURACY_LOW = 1, ACCURACY_MEDIUM = 2, ACCURACY_HIGH = 3, + + ftl_last = ACCURACY_HIGH, }; enum class InputDeviceSensorReportingMode : int32_t { @@ -128,8 +130,9 @@ enum class InputDeviceLightType : int32_t { INPUT = 0, PLAYER_ID = 1, KEYBOARD_BACKLIGHT = 2, + KEYBOARD_MIC_MUTE = 3, - ftl_last = KEYBOARD_BACKLIGHT + ftl_last = KEYBOARD_MIC_MUTE }; enum class InputDeviceLightCapability : uint32_t { @@ -277,8 +280,8 @@ public: void initialize(int32_t id, int32_t generation, int32_t controllerNumber, const InputDeviceIdentifier& identifier, const std::string& alias, - bool isExternal, bool hasMic, int32_t associatedDisplayId, - InputDeviceViewBehavior viewBehavior = {{}}); + bool isExternal, bool hasMic, ui::LogicalDisplayId associatedDisplayId, + InputDeviceViewBehavior viewBehavior = {{}}, bool enabled = true); inline int32_t getId() const { return mId; } inline int32_t getControllerNumber() const { return mControllerNumber; } @@ -345,7 +348,10 @@ public: } inline std::optional<InputDeviceUsiVersion> getUsiVersion() const { return mUsiVersion; } - inline int32_t getAssociatedDisplayId() const { return mAssociatedDisplayId; } + inline ui::LogicalDisplayId getAssociatedDisplayId() const { return mAssociatedDisplayId; } + + inline void setEnabled(bool enabled) { mEnabled = enabled; } + inline bool isEnabled() const { return mEnabled; } private: int32_t mId; @@ -360,7 +366,8 @@ private: int32_t mKeyboardType; std::shared_ptr<KeyCharacterMap> mKeyCharacterMap; std::optional<InputDeviceUsiVersion> mUsiVersion; - int32_t mAssociatedDisplayId; + ui::LogicalDisplayId mAssociatedDisplayId{ui::LogicalDisplayId::INVALID}; + bool mEnabled; bool mHasVibrator; bool mHasBattery; |