diff options
| author | german77 <juangerman-13@hotmail.com> | 2023-10-22 10:14:08 -0600 |
|---|---|---|
| committer | german77 <juangerman-13@hotmail.com> | 2023-10-22 11:30:59 -0600 |
| commit | 9508a123794cb4d3ca0b78e2d20967045b8494f8 (patch) | |
| tree | dde7601e0e2dca2613947bc28ccfc8b7f98b5a8c /src/input_common/helpers/joycon_driver.h | |
| parent | d0ab5211a127c8487dfb52eb3bbfb75405655336 (diff) | |
input_common: joycon: Move vibrations to a queue
Diffstat (limited to 'src/input_common/helpers/joycon_driver.h')
| -rw-r--r-- | src/input_common/helpers/joycon_driver.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index 335e12cc31..5355780fbb 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h @@ -9,6 +9,7 @@ #include <span> #include <thread> +#include "common/threadsafe_queue.h" #include "input_common/helpers/joycon_protocol/joycon_types.h" namespace Common::Input { @@ -152,6 +153,10 @@ private: SerialNumber handle_serial_number{}; // Serial number type reported by hidapi SupportedFeatures supported_features{}; + /// Queue of vibration request to controllers + Common::Input::DriverResult last_vibration_result{Common::Input::DriverResult::Success}; + Common::SPSCQueue<VibrationValue> vibration_queue; + // Thread related mutable std::mutex mutex; std::jthread input_thread; |
