input_common: joycon: Move vibrations to a queue
This commit is contained in:
@ -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;
|
||||
|
Reference in New Issue
Block a user