From 039abff861babf96f174c99b1d18fbea2044f1e7 Mon Sep 17 00:00:00 2001 From: Dante Ruiz Date: Tue, 28 Nov 2017 10:43:37 -0800 Subject: [PATCH] fix viveControllerManager not registering the vive input is no hand controllers are present --- plugins/openvr/src/ViveControllerManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/openvr/src/ViveControllerManager.cpp b/plugins/openvr/src/ViveControllerManager.cpp index 430dc193a3..d57b1531c4 100644 --- a/plugins/openvr/src/ViveControllerManager.cpp +++ b/plugins/openvr/src/ViveControllerManager.cpp @@ -274,13 +274,13 @@ void ViveControllerManager::pluginUpdate(float deltaTime, const controller::Inpu _inputDevice->update(deltaTime, inputCalibrationData); }); - if (_inputDevice->_trackedControllers == 0 && _registeredWithInputMapper) { + if (isDesktopMode() && _registeredWithInputMapper) { userInputMapper->removeDevice(_inputDevice->_deviceID); _registeredWithInputMapper = false; _inputDevice->_poseStateMap.clear(); } - if (!_registeredWithInputMapper && _inputDevice->_trackedControllers > 0) { + if (!_registeredWithInputMapper && !isDesktopMode()) { userInputMapper->registerDevice(_inputDevice); _registeredWithInputMapper = true; }