From 20b93a7afa611ffd3229eaa86400f4ee8ce4e07e Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Wed, 28 Sep 2016 16:38:03 -0700 Subject: [PATCH] Add redirection to entry on first turn if you don't have Vive --- interface/src/Application.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 9cf0e841f9..45c14b2f88 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1277,7 +1277,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : bool hasTutorialContent = contentVersion >= 1; Setting::Handle firstRun { Settings::firstRun, true }; - bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && PluginUtils::isHandControllerAvailable(); + bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable("OpenVR (Vive)") && PluginUtils::isHandControllerAvailable(); Setting::Handle tutorialComplete { "tutorialComplete", false }; bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get(); @@ -1320,13 +1320,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : } if (addressLookupString.isEmpty() && firstRun.get()) { - DependencyManager::get()->ifLocalSandboxRunningElse([=]() { - qDebug() << "Home sandbox appears to be running, going to Home."; - DependencyManager::get()->goToLocalSandbox(); - }, [=]() { - qDebug() << "Home sandbox does not appear to be running, going to Entry."; + if (hasHMDAndHandControllers) { + DependencyManager::get()->ifLocalSandboxRunningElse([=]() { + qDebug() << "Home sandbox appears to be running, going to Home."; + DependencyManager::get()->goToLocalSandbox(); + }, [=]() { + qDebug() << "Home sandbox does not appear to be running, going to Entry."; + DependencyManager::get()->goToEntry(); + }); + } else { DependencyManager::get()->goToEntry(); - }); + } } else { qDebug() << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString); DependencyManager::get()->loadSettings(addressLookupString);