(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 | // Close serial port | 956 | // Close serial port |
| 957 | // close(serial_fd); | 957 | // close(serial_fd); |
| 958 | 958 | ||
| 959 | LeapManager::terminate(); | ||
| 960 | |||
| 959 | if (_settingsAutosave->isChecked()) { | 961 | if (_settingsAutosave->isChecked()) { |
| 960 | saveSettings(); | 962 | saveSettings(); |
| 961 | _settings->sync(); | 963 | _settings->sync(); |
| @@ -1648,6 +1650,8 @@ void Application::init() { · 686 unmodified lines | |||
| 1648 | QMetaObject::invokeMethod(_fullScreenMode, "trigger", Qt::QueuedConnection); | 1650 | QMetaObject::invokeMethod(_fullScreenMode, "trigger", Qt::QueuedConnection); |
| 1649 | } | 1651 | } |
| 1650 | 1652 | ||
| 1653 | LeapManager::initialize(); | ||
| 1654 | |||
| 1651 | gettimeofday(&_timerStart, NULL); | 1655 | gettimeofday(&_timerStart, NULL); |
| 1652 | gettimeofday(&_lastTimeIdle, NULL); | 1656 | gettimeofday(&_lastTimeIdle, NULL); |
| 1653 | 1657 | ||
| @@ -1806,7 +1810,8 @@ void Application::update(float deltaTime) { · 152 unmodified lines | |||
| 1806 | 1810 | ||
| 1807 | // Leap finger-sensing device | 1811 | // Leap finger-sensing device |
| 1808 | LeapManager::nextFrame(); | 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 | // Read serial port interface devices | 1816 | // Read serial port interface devices |
| 1812 | if (_serialHeadSensor.isActive()) { | 1817 | if (_serialHeadSensor.isActive()) { |