From e4dfd513378432c4343159b09b3129f608daa597 Mon Sep 17 00:00:00 2001 From: german77 Date: Sun, 22 Oct 2023 10:14:08 -0600 Subject: input_common: joycon: Move vibrations to a queue --- src/input_common/helpers/joycon_driver.h | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/input_common/helpers/joycon_driver.h') diff --git a/src/input_common/helpers/joycon_driver.h b/src/input_common/helpers/joycon_driver.h index 335e12cc3..5355780fb 100644 --- a/src/input_common/helpers/joycon_driver.h +++ b/src/input_common/helpers/joycon_driver.h @@ -9,6 +9,7 @@ #include #include +#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 vibration_queue; + // Thread related mutable std::mutex mutex; std::jthread input_thread; -- cgit v1.2.3