InputCommon: Make Wiimote rumble variable thread safe

This commit is contained in:
Filoppi
2021-05-10 22:44:17 +03:00
parent 08f8c27927
commit a77e3b4a9b
2 changed files with 6 additions and 4 deletions

View File

@ -5,6 +5,7 @@
#pragma once
#include <array>
#include <atomic>
#include <chrono>
#include <memory>
#include <vector>
@ -262,7 +263,7 @@ private:
bool m_rumble = false;
// For pulse of rumble motor to simulate multiple levels.
ControlState m_rumble_level = 0;
std::atomic<ControlState> m_rumble_level;
Clock::time_point m_last_rumble_change = Clock::now();
// Assume mode is disabled so one gets set.