mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Resume eye tracking at start-up if was running at shut-down
This commit is contained in:
parent
e37fd956ed
commit
e2bf5cad3e
2 changed files with 6 additions and 1 deletions
|
@ -2042,9 +2042,13 @@ void Application::setActiveFaceTracker() {
|
|||
|
||||
void Application::setActiveEyeTracker() {
|
||||
#ifdef HAVE_IVIEWHMD
|
||||
auto eyeTracker = DependencyManager::get<EyeTracker>();
|
||||
if (!eyeTracker->isInitialized()) {
|
||||
return;
|
||||
}
|
||||
|
||||
bool isEyeTracking = Menu::getInstance()->isOptionChecked(MenuOption::SMIEyeTracking);
|
||||
bool isSimulating = Menu::getInstance()->isOptionChecked(MenuOption::SimulateEyeTracking);
|
||||
auto eyeTracker = DependencyManager::get<EyeTracker>();
|
||||
eyeTracker->setEnabled(isEyeTracking, isSimulating);
|
||||
if (isEyeTracking && !eyeTracker->isTracking()) {
|
||||
Menu::getInstance()->setIsOptionChecked(MenuOption::SMIEyeTracking, false);
|
||||
|
|
|
@ -33,6 +33,7 @@ public:
|
|||
void setEnabled(bool enabled, bool simulate);
|
||||
void reset();
|
||||
|
||||
bool isInitialized() const { return _isInitialized; }
|
||||
bool isTracking() const { return _isEnabled; }
|
||||
bool isSimulating() const { return _isSimulating; }
|
||||
|
||||
|
|
Loading…
Reference in a new issue