From f7f4c48b9b9578860460118c281ef2857695911d Mon Sep 17 00:00:00 2001 From: Leonardo Murillo Date: Fri, 23 May 2014 08:40:41 -0600 Subject: [PATCH] Revert "Initialise lisencing manager after we have enabled Visage." This reverts commit 061f182fab4a8f72e046021cec93a3a41ac22f82. --- interface/src/devices/Visage.cpp | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) diff --git a/interface/src/devices/Visage.cpp b/interface/src/devices/Visage.cpp index 70cdaf2b01..119d89654a 100644 --- a/interface/src/devices/Visage.cpp +++ b/interface/src/devices/Visage.cpp @@ -41,8 +41,14 @@ Visage::Visage() : _headOrigin(DEFAULT_HEAD_ORIGIN) { #ifdef HAVE_VISAGE - _tracker = NULL; - _data = NULL; +#ifdef WIN32 + QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage"; +#else + QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage/license.vlc"; +#endif + initializeLicenseManager(licensePath.data()); + _tracker = new VisageTracker2(Application::resourcesPath().toLatin1() + "visage/tracker.cfg"); + _data = new FaceData(); #endif } @@ -173,19 +179,6 @@ void Visage::setEnabled(bool enabled) { return; } if ((_enabled = enabled)) { - if(_tracker == NULL && _data == NULL){ - - #ifdef WIN32 - QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage"; - #else - QByteArray licensePath = Application::resourcesPath().toLatin1() + "visage/license.vlc"; - #endif - - initializeLicenseManager(licensePath.data()); - _tracker = new VisageTracker2(Application::resourcesPath().toLatin1() + "visage/tracker.cfg"); - _data = new FaceData(); - } - _tracker->trackFromCam(); } else { _tracker->stop();