From f325500d1489dcf6b9499e56d7efe7ab04c93707 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Tue, 22 Jul 2014 14:38:41 -0700 Subject: [PATCH] repairs to stubbed faceshft constructor --- interface/src/devices/Faceshift.cpp | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/interface/src/devices/Faceshift.cpp b/interface/src/devices/Faceshift.cpp index 9b2fc7e821..b5cba8348c 100644 --- a/interface/src/devices/Faceshift.cpp +++ b/interface/src/devices/Faceshift.cpp @@ -27,8 +27,6 @@ using namespace std; const quint16 FACESHIFT_PORT = 33433; -#ifdef HAVE_FACESHIFT - Faceshift::Faceshift() : _tcpEnabled(true), _tcpRetryCount(0), @@ -53,6 +51,7 @@ Faceshift::Faceshift() : _longTermAverageEyeYaw(0.0f), _longTermAverageInitialized(false) { +#ifdef HAVE_FACESHIFT connect(&_tcpSocket, SIGNAL(connected()), SLOT(noteConnected())); connect(&_tcpSocket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(noteError(QAbstractSocket::SocketError))); connect(&_tcpSocket, SIGNAL(readyRead()), SLOT(readFromSocket())); @@ -61,18 +60,13 @@ Faceshift::Faceshift() : connect(&_udpSocket, SIGNAL(readyRead()), SLOT(readPendingDatagrams())); _udpSocket.bind(FACESHIFT_PORT); -} - -#else - -Faceshift::Faceshift() { - -} - #endif +} void Faceshift::init() { +#ifdef HAVE_FACESHIFT setTCPEnabled(Menu::getInstance()->isOptionChecked(MenuOption::Faceshift)); +#endif } bool Faceshift::isConnectedOrConnecting() const {