Skip to content
Snippets Groups Projects
Commit 4d058cfb authored by wwylele's avatar wwylele
Browse files

motion_emu: fix initialization order

parent f84c965d
No related branches found
No related tags found
No related merge requests found
...@@ -74,11 +74,14 @@ private: ...@@ -74,11 +74,14 @@ private:
bool is_tilting = false; bool is_tilting = false;
Common::Event shutdown_event; Common::Event shutdown_event;
std::thread motion_emu_thread;
std::tuple<Math::Vec3<float>, Math::Vec3<float>> status; std::tuple<Math::Vec3<float>, Math::Vec3<float>> status;
std::mutex status_mutex; 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() { void MotionEmuThread() {
auto update_time = std::chrono::steady_clock::now(); auto update_time = std::chrono::steady_clock::now();
Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0); Math::Quaternion<float> q = MakeQuaternion(Math::Vec3<float>(), 0);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment