Showing the changes to interface/src/scripting/ControllerScriptingInterface.cpp (1 of 24 files). Show all
Unified · Split
| @@ -267,9 +267,9 @@ void ControllerScriptingInterface::releaseJoystick(int joystickIndex) { · 266 unmodified lines | ||
| 267 | 267 | } |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | −glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { | |
| 271 | − GLCanvas* widget = Application::getInstance()->getGLWidget(); | |
| 272 | − return glm::vec2(widget->width(), widget->height()); | |
| 270 | +glm::vec2 ControllerScriptingInterface::getViewportDimensions() const { | |
| 271 | + QSharedPointer<GLCanvas> glCanvas = DependencyManager::get<GLCanvas>(); | |
| 272 | + return glm::vec2(glCanvas->width(), glCanvas->height()); | |
| 273 | 273 | } |
| 274 | 274 | |
| 275 | 275 | AbstractInputController* ControllerScriptingInterface::createInputController(const QString& deviceName, const QString& tracker) { |