summaryrefslogtreecommitdiff
path: root/src/input_common/helpers/joycon_driver.h
diff options
context:
space:
mode:
authorGravatar liamwhite2023-10-29 11:25:02 -0400
committerGravatar GitHub2023-10-29 11:25:02 -0400
commit40c97c0549fa5f680f47a7f9d10c536d1cb1fd0d (patch)
treea75821894c25e0de0f466e1ca3f78400e8a8a78a /src/input_common/helpers/joycon_driver.h
parentMerge pull request #11843 from liamwhite/sync-process (diff)
parentinput_common: joycon: Move vibrations to a queue (diff)
downloadyuzu-40c97c0549fa5f680f47a7f9d10c536d1cb1fd0d.tar.gz
yuzu-40c97c0549fa5f680f47a7f9d10c536d1cb1fd0d.tar.xz
yuzu-40c97c0549fa5f680f47a7f9d10c536d1cb1fd0d.zip
Merge pull request #11852 from german77/async_brr
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.h5
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 335e12cc3..5355780fb 100644
--- a/src/input_common/helpers/joycon_driver.h
+++ b/src/input_common/helpers/joycon_driver.h
@@ -9,6 +9,7 @@
9#include <span> 9#include <span>
10#include <thread> 10#include <thread>
11 11
12#include "common/threadsafe_queue.h"
12#include "input_common/helpers/joycon_protocol/joycon_types.h" 13#include "input_common/helpers/joycon_protocol/joycon_types.h"
13 14
14namespace Common::Input { 15namespace Common::Input {
@@ -152,6 +153,10 @@ private:
152 SerialNumber handle_serial_number{}; // Serial number type reported by hidapi 153 SerialNumber handle_serial_number{}; // Serial number type reported by hidapi
153 SupportedFeatures supported_features{}; 154 SupportedFeatures supported_features{};
154 155
156 /// Queue of vibration request to controllers
157 Common::Input::DriverResult last_vibration_result{Common::Input::DriverResult::Success};
158 Common::SPSCQueue<VibrationValue> vibration_queue;
159
155 // Thread related 160 // Thread related
156 mutable std::mutex mutex; 161 mutable std::mutex mutex;
157 std::jthread input_thread; 162 std::jthread input_thread;