From a69b95187be4afce4eefa8f7b08ceca7b88b7724 Mon Sep 17 00:00:00 2001 From: jacqueline Date: Wed, 15 Jan 2025 15:37:35 +1100 Subject: Handle lock state in each input device, instead of in the lvgl driver --- src/tangara/input/input_touch_dpad.hpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/tangara/input/input_touch_dpad.hpp') diff --git a/src/tangara/input/input_touch_dpad.hpp b/src/tangara/input/input_touch_dpad.hpp index 4e50819a..d787bace 100644 --- a/src/tangara/input/input_touch_dpad.hpp +++ b/src/tangara/input/input_touch_dpad.hpp @@ -11,10 +11,10 @@ #include "indev/lv_indev.h" #include "drivers/haptics.hpp" +#include "drivers/touchwheel.hpp" #include "input/input_device.hpp" #include "input/input_hook.hpp" #include "input/input_trigger.hpp" -#include "drivers/touchwheel.hpp" namespace input { @@ -27,6 +27,9 @@ class TouchDPad : public IInputDevice { auto name() -> std::string override; auto triggers() -> std::vector> override; + auto onLock() -> void override; + auto onUnlock() -> void override; + private: drivers::TouchWheel& wheel_; @@ -35,6 +38,8 @@ class TouchDPad : public IInputDevice { TriggerHooks right_; TriggerHooks down_; TriggerHooks left_; + + bool locked_; }; } // namespace input -- cgit v1.2.3