summaryrefslogtreecommitdiffstats
path: root/src/input/frontend/qinputaspect.cpp
diff options
context:
space:
mode:
authorPaul Lemire <paul.lemire@kdab.com>2016-08-25 11:39:27 +0200
committerSean Harmer <sean.harmer@kdab.com>2016-11-18 18:45:26 +0000
commit2cebd3e3b48e1bb0ce1f3df0b6457299edbfffe1 (patch)
tree12b37a256328a7d2a3f647e4fd02bd8300fc295c /src/input/frontend/qinputaspect.cpp
parentc3953dab6d2d8c31dd6462c76fac097c0bd0784a (diff)
QInputAspect: use the load device wrapper job
Change-Id: Ieb108830fb4635cf155bbf0c5c9ddba167b7fba7 Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/input/frontend/qinputaspect.cpp')
-rw-r--r--src/input/frontend/qinputaspect.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/input/frontend/qinputaspect.cpp b/src/input/frontend/qinputaspect.cpp
index 2e12f1fb0..427489dfe 100644
--- a/src/input/frontend/qinputaspect.cpp
+++ b/src/input/frontend/qinputaspect.cpp
@@ -84,6 +84,7 @@
#include <Qt3DInput/private/genericdevicebackendnode_p.h>
#include <Qt3DInput/private/inputsettings_p.h>
#include <Qt3DInput/private/eventsourcesetterhelper_p.h>
+#include <Qt3DInput/private/loadproxydevicejob_p.h>
#ifdef HAVE_QGAMEPAD
# include <Qt3DInput/private/qgamepadinput_p.h>
@@ -221,6 +222,16 @@ QVector<QAspectJobPtr> QInputAspect::jobsToExecute(qint64 time)
for (QInputDeviceIntegration *integration : integrations)
jobs += integration->jobsToExecute(time);
+ const QVector<Qt3DCore::QNodeId> proxiesToLoad = d->m_inputHandler->physicalDeviceProxyManager()->takePendingProxiesToLoad();
+ if (!proxiesToLoad.isEmpty()) {
+ // Since loading wrappers occurs quite rarely, no point in keeping the job in a
+ // member variable
+ auto loadWrappersJob = Input::LoadProxyDeviceJobPtr::create();
+ loadWrappersJob->setProxiesToLoad(std::move(proxiesToLoad));
+ loadWrappersJob->setInputHandler(d->m_inputHandler.data());
+ jobs.push_back(loadWrappersJob);
+ }
+
// All the jobs added up until this point are independents
// but the axis action jobs will be dependent on these
const QVector<QAspectJobPtr> dependsOnJobs = jobs;