Showing the changes to interface/src/Application.cpp (1 of 2 files). Show all
Unified · Split
| @@ -2042,9 +2042,13 @@ void Application::setActiveFaceTracker() { · 2041 unmodified lines | |||
| 2042 | 2042 | ||
| 2043 | void Application::setActiveEyeTracker() { | 2043 | void Application::setActiveEyeTracker() { |
| 2044 | #ifdef HAVE_IVIEWHMD | 2044 | #ifdef HAVE_IVIEWHMD |
| 2045 | auto eyeTracker = DependencyManager::get<EyeTracker>(); | ||
| 2046 | if (!eyeTracker->isInitialized()) { | ||
| 2047 | return; | ||
| 2048 | } | ||
| 2049 | |||
| 2045 | bool isEyeTracking = Menu::getInstance()->isOptionChecked(MenuOption::SMIEyeTracking); | 2050 | bool isEyeTracking = Menu::getInstance()->isOptionChecked(MenuOption::SMIEyeTracking); |
| 2046 | bool isSimulating = Menu::getInstance()->isOptionChecked(MenuOption::SimulateEyeTracking); | 2051 | bool isSimulating = Menu::getInstance()->isOptionChecked(MenuOption::SimulateEyeTracking); |
| 2047 | auto eyeTracker = DependencyManager::get<EyeTracker>(); | ||
| 2048 | eyeTracker->setEnabled(isEyeTracking, isSimulating); | 2052 | eyeTracker->setEnabled(isEyeTracking, isSimulating); |
| 2049 | if (isEyeTracking && !eyeTracker->isTracking()) { | 2053 | if (isEyeTracking && !eyeTracker->isTracking()) { |
| 2050 | Menu::getInstance()->setIsOptionChecked(MenuOption::SMIEyeTracking, false); | 2054 | Menu::getInstance()->setIsOptionChecked(MenuOption::SMIEyeTracking, false); |