diff options
author | bunnei <bunneidev@gmail.com> | 2017-08-22 15:36:38 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-22 15:36:38 +0200 |
commit | 03c782e378cdcd206267656d69dbc98cf8c6274e (patch) | |
tree | 2d7a5e55313ef7f421b6d47f7cee86421af0699e | |
parent | Merge pull request #2884 from wwylele/clip (diff) | |
parent | motion_emu: fix initialization order (diff) | |
download | yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar.gz yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar.bz2 yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar.lz yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar.xz yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.tar.zst yuzu-03c782e378cdcd206267656d69dbc98cf8c6274e.zip |
-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: bool is_tilting = false; Common::Event shutdown_event; - std::thread motion_emu_thread; std::tuple<Math::Vec3<float>, Math::Vec3<float>> status; std::mutex status_mutex; + // Note: always keep the thread declaration at the end so that other objects are initialized + // before this! + std::thread motion_emu_thread; + void MotionEmuThread() { auto update_time = std::chrono::steady_clock::now(); Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0); |