History

Add redirection to entry on first turn if you don't have Vive

Ryan Huffman committed 10 years ago

Commit 20b93a71 parent 8c6ba201 file · +11 −7Browse files

Showing the changes to interface/src/Application.cpp (1 of 1 file). Show all

Unified · Split

interface/src/Application.cpp+11−7
@@ -1277,7 +1277,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 1276 unmodified lines
12771277 bool hasTutorialContent = contentVersion >= 1;
12781278
12791279 Setting::Handle<bool> firstRun { Settings::firstRun, true };
1280− bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && PluginUtils::isHandControllerAvailable();
1280+ bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable("OpenVR (Vive)") && PluginUtils::isHandControllerAvailable();
12811281 Setting::Handle<bool> tutorialComplete { "tutorialComplete", false };
12821282
12831283 bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get();
@@ -1320,13 +1320,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 36 unmodified lines
13201320 }
13211321
13221322 if (addressLookupString.isEmpty() && firstRun.get()) {
1323− DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {
1324− qDebug() << "Home sandbox appears to be running, going to Home.";
1325− DependencyManager::get<AddressManager>()->goToLocalSandbox();
1326− }, [=]() {
1327− qDebug() << "Home sandbox does not appear to be running, going to Entry.";
1323+ if (hasHMDAndHandControllers) {
1324+ DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {
1325+ qDebug() << "Home sandbox appears to be running, going to Home.";
1326+ DependencyManager::get<AddressManager>()->goToLocalSandbox();
1327+ }, [=]() {
1328+ qDebug() << "Home sandbox does not appear to be running, going to Entry.";
1329+ DependencyManager::get<AddressManager>()->goToEntry();
1330+ });
1331+ } else {
13281332 DependencyManager::get<AddressManager>()->goToEntry();
1329− });
1333+ }
13301334 } else {
13311335 qDebug() << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);
13321336 DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);