From e10cecd3101400d2228db6b3f5a9d195f357193c Mon Sep 17 00:00:00 2001 From: "Anthony J. Thibault" Date: Tue, 29 Dec 2015 09:23:03 -0800 Subject: [PATCH] Build fix for linux #2? --- plugins/hifiNeuron/src/NeuronPlugin.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/hifiNeuron/src/NeuronPlugin.cpp b/plugins/hifiNeuron/src/NeuronPlugin.cpp index 6132c16a43..a175ce8e06 100644 --- a/plugins/hifiNeuron/src/NeuronPlugin.cpp +++ b/plugins/hifiNeuron/src/NeuronPlugin.cpp @@ -24,7 +24,10 @@ Q_LOGGING_CATEGORY(inputplugins, "hifi.inputplugins") #define __OS_XUN__ 1 #define BOOL int + +#ifdef HAVE_NEURON #include +#endif const QString NeuronPlugin::NAME = "Neuron"; const QString NeuronPlugin::NEURON_ID_STRING = "Perception Neuron"; @@ -312,6 +315,8 @@ static quat eulerToQuat(vec3 euler) { glm::angleAxis(e.z, Vectors::UNIT_Z)); } +#ifdef HAVE_NEURON + // // neuronDataReader SDK callback functions // @@ -430,17 +435,24 @@ static void SocketStatusChangedCallback(void* context, SOCKET_REF sender, Socket qCDebug(inputplugins) << "NeuronPlugin: socket status = " << message; } +#endif // #ifdef HAVE_NEURON + // // NeuronPlugin // bool NeuronPlugin::isSupported() const { +#ifdef HAVE_NEURON // Because it's a client/server network architecture, we can't tell // if the neuron is actually connected until we connect to the server. return true; +#else + return false; +#endif } void NeuronPlugin::activate() { +#ifdef HAVE_NEURON InputPlugin::activate(); // register with userInputMapper @@ -466,9 +478,11 @@ void NeuronPlugin::activate() { BRRegisterAutoSyncParmeter(_socketRef, Cmd_CombinationMode); } +#endif } void NeuronPlugin::deactivate() { +#ifdef HAVE_NEURON // unregister from userInputMapper if (_inputDevice->_deviceID != controller::Input::INVALID_DEVICE) { auto userInputMapper = DependencyManager::get(); @@ -481,6 +495,7 @@ void NeuronPlugin::deactivate() { } InputPlugin::deactivate(); +#endif } void NeuronPlugin::pluginUpdate(float deltaTime, bool jointsCaptured) {