(changed per requests and re-merged) Two Leap-related crashes fixed, plu...
Showing the changes to interface/src/Application.cpp (1 of 8 files). Show all
Unified · Split
| @@ -956,6 +956,8 @@ void Application::terminate() { · 955 unmodified lines | ||
| 956 | 956 | // Close serial port |
| 957 | 957 | // close(serial_fd); |
| 958 | 958 | |
| 959 | + LeapManager::terminate(); | |
| 960 | + | |
| 959 | 961 | if (_settingsAutosave->isChecked()) { |
| 960 | 962 | saveSettings(); |
| 961 | 963 | _settings->sync(); |
| @@ -1648,6 +1650,8 @@ void Application::init() { · 686 unmodified lines | ||
| 1648 | 1650 | QMetaObject::invokeMethod(_fullScreenMode, "trigger", Qt::QueuedConnection); |
| 1649 | 1651 | } |
| 1650 | 1652 | |
| 1653 | + LeapManager::initialize(); | |
| 1654 | + | |
| 1651 | 1655 | gettimeofday(&_timerStart, NULL); |
| 1652 | 1656 | gettimeofday(&_lastTimeIdle, NULL); |
| 1653 | 1657 | |
| @@ -1806,7 +1810,8 @@ void Application::update(float deltaTime) { · 152 unmodified lines | ||
| 1806 | 1810 | |
| 1807 | 1811 | // Leap finger-sensing device |
| 1808 | 1812 | LeapManager::nextFrame(); |
| 1809 | − _myAvatar.getHand().setLeapFingers(LeapManager::getFingerPositions()); | |
| 1813 | + _myAvatar.getHand().setLeapFingers(LeapManager::getFingerTips(), LeapManager::getFingerRoots()); | |
| 1814 | + _myAvatar.getHand().setLeapHands(LeapManager::getHandPositions(), LeapManager::getHandNormals()); | |
| 1810 | 1815 | |
| 1811 | 1816 | // Read serial port interface devices |
| 1812 | 1817 | if (_serialHeadSensor.isActive()) { |