diff --git a/simulate/main.cc b/simulate/main.cc index 3e558d9d..76642774 100644 --- a/simulate/main.cc +++ b/simulate/main.cc @@ -469,7 +469,8 @@ int main(int argc, const char** argv) { scanPluginLibraries(); // simulate object encapsulates the UI - mj::Simulate sim(std::make_unique()); + auto sim = std::make_unique( + std::make_unique()); const char* filename = nullptr; if (argc > 1) { @@ -477,10 +478,10 @@ int main(int argc, const char** argv) { } // start physics thread - std::thread physicsthreadhandle = std::thread(&PhysicsThread, &sim, filename); + std::thread physicsthreadhandle(&PhysicsThread, sim.get(), filename); // start simulation UI loop (blocking call) - sim.renderloop(); + sim->renderloop(); physicsthreadhandle.join(); return 0;