1
0
Fork 0

Tweak launcher update timer to sleep the CPU

Fix the launcher keeping the main thread busy all the time (use a non-
zero timeout to ensure the dispatcher sleeps a bit)
This commit is contained in:
James Turner 2018-09-20 11:03:47 +01:00
parent 098c489ae0
commit 518d3cbd0f

View file

@ -106,7 +106,7 @@ LauncherController::LauncherController(QObject *parent, QWindow* window) :
m_aircraftModel->setPackageRoot(globals->packageRoot());
m_subsystemIdleTimer = new QTimer(this);
m_subsystemIdleTimer->setInterval(0);
m_subsystemIdleTimer->setInterval(10);
connect(m_subsystemIdleTimer, &QTimer::timeout, []()
{globals->get_subsystem_mgr()->update(0.0);});
m_subsystemIdleTimer->start();