mirror of
https://git.eden-emu.dev/eden-emu/eden
synced 2026-05-14 15:06:57 +02:00
input_common: joycon: Move vibrations to a queue
This commit is contained in:
parent
d0ab5211a1
commit
9508a12379
2 changed files with 19 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue