diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_common/motion_emu.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/input_common/motion_emu.cpp b/src/input_common/motion_emu.cpp index a1761f184..59a035e70 100644 --- a/src/input_common/motion_emu.cpp +++ b/src/input_common/motion_emu.cpp | |||
| @@ -74,11 +74,14 @@ private: | |||
| 74 | bool is_tilting = false; | 74 | bool is_tilting = false; |
| 75 | 75 | ||
| 76 | Common::Event shutdown_event; | 76 | Common::Event shutdown_event; |
| 77 | std::thread motion_emu_thread; | ||
| 78 | 77 | ||
| 79 | std::tuple<Math::Vec3<float>, Math::Vec3<float>> status; | 78 | std::tuple<Math::Vec3<float>, Math::Vec3<float>> status; |
| 80 | std::mutex status_mutex; | 79 | std::mutex status_mutex; |
| 81 | 80 | ||
| 81 | // Note: always keep the thread declaration at the end so that other objects are initialized | ||
| 82 | // before this! | ||
| 83 | std::thread motion_emu_thread; | ||
| 84 | |||
| 82 | void MotionEmuThread() { | 85 | void MotionEmuThread() { |
| 83 | auto update_time = std::chrono::steady_clock::now(); | 86 | auto update_time = std::chrono::steady_clock::now(); |
| 84 | Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0); | 87 | Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0); |