summaryrefslogtreecommitdiffhomepage
path: root/facetracknoir/tracker.cpp
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2013-07-18 14:54:55 +0200
committerStanislaw Halik <sthalik@misaki.pl>2013-07-18 14:54:55 +0200
commit4e866b559a10a61d3645a47e7b0c4b2a85ff9424 (patch)
treef413a2f3cb354dd27c1f165005d6c2b6f6be6a3c /facetracknoir/tracker.cpp
parent18bbc3d392c335f47343061d4f054306e2c06b1e (diff)
Don't sleep with lock held
Diffstat (limited to 'facetracknoir/tracker.cpp')
-rw-r--r--facetracknoir/tracker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/facetracknoir/tracker.cpp b/facetracknoir/tracker.cpp
index 93b09792..3b2562a8 100644
--- a/facetracknoir/tracker.cpp
+++ b/facetracknoir/tracker.cpp
@@ -119,8 +119,6 @@ void Tracker::run() {
{
if (should_quit)
break;
-
- QMutexLocker foo(&mtx);
for (int i = 0; i < 6; i++)
newpose[i] = 0;
@@ -169,6 +167,8 @@ void Tracker::run() {
}
if (getTrackingActive()) {
+ QMutexLocker foo(&mtx);
+
// get values
for (int i = 0; i < 6; i++)
target_camera.axes[i] = mainApp->axis(i).headPos;