Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 3 files). Show all
Unified · Split
| @@ -84,11 +84,11 @@ glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { · 83 unmodified lines | |||
| 84 | return qApp->getUiSize(); | 84 | return qApp->getUiSize(); |
| 85 | } | 85 | } |
| 86 | 86 | ||
| 87 | controller::InputController::Pointer ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { | 87 | controller::InputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { |
| 88 | // This is where we retreive the Device Tracker category and then the sub tracker within it | 88 | // This is where we retrieve the Device Tracker category and then the sub tracker within it |
| 89 | auto icIt = _inputControllers.find(0); | 89 | auto icIt = _inputControllers.find(0); |
| 90 | if (icIt != _inputControllers.end()) { | 90 | if (icIt != _inputControllers.end()) { |
| 91 | return (*icIt).second; | 91 | return (*icIt).second.get(); |
| 92 | } | 92 | } |
| 93 | 93 | ||
| 94 | 94 | ||
| @@ -110,15 +110,15 @@ controller::InputController::Pointer ControllerScriptingInterface::createInputCo · 15 unmodified lines | |||
| 110 | controller::InputController::Pointer inputController = std::make_shared<InputController>(deviceID, trackerID, this); | 110 | controller::InputController::Pointer inputController = std::make_shared<InputController>(deviceID, trackerID, this); |
| 111 | controller::InputController::Key key = inputController->getKey(); | 111 | controller::InputController::Key key = inputController->getKey(); |
| 112 | _inputControllers.insert(InputControllerMap::value_type(key, inputController)); | 112 | _inputControllers.insert(InputControllerMap::value_type(key, inputController)); |
| 113 | return inputController; | 113 | return inputController.get(); |
| 114 | } | 114 | } |
| 115 | } | 115 | } |
| 116 | } | 116 | } |
| 117 | 117 | ||
| 118 | return controller::InputController::Pointer(); | 118 | return nullptr; |
| 119 | } | 119 | } |
| 120 | 120 | ||
| 121 | void ControllerScriptingInterface::releaseInputController(controller::InputController::Pointer input) { | 121 | void ControllerScriptingInterface::releaseInputController(controller::InputController* input) { |
| 122 | _inputControllers.erase(input->getKey()); | 122 | _inputControllers.erase(input->getKey()); |
| 123 | } | 123 | } |
| 124 | 124 | ||