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
1277 bool hasTutorialContent = contentVersion >= 1;1277 bool hasTutorialContent = contentVersion >= 1;
1278 1278
1279 Setting::Handle<bool> firstRun { Settings::firstRun, true };1279 Setting::Handle<bool> firstRun { Settings::firstRun, true };
1280 bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && PluginUtils::isHandControllerAvailable();1280 bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable("OpenVR (Vive)") && PluginUtils::isHandControllerAvailable();
1281 Setting::Handle<bool> tutorialComplete { "tutorialComplete", false };1281 Setting::Handle<bool> tutorialComplete { "tutorialComplete", false };
1282 1282
1283 bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get();1283 bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get();
@@ -1320,13 +1320,17 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 36 unmodified lines
1320 }1320 }
1321 1321
1322 if (addressLookupString.isEmpty() && firstRun.get()) {1322 if (addressLookupString.isEmpty() && firstRun.get()) {
1323 DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {1323 if (hasHMDAndHandControllers) {
1324 qDebug() << "Home sandbox appears to be running, going to Home.";1324 DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() {
1325 DependencyManager::get<AddressManager>()->goToLocalSandbox();1325 qDebug() << "Home sandbox appears to be running, going to Home.";
1326 }, [=]() {1326 DependencyManager::get<AddressManager>()->goToLocalSandbox();
1327 qDebug() << "Home sandbox does not appear to be running, going to Entry.";1327 }, [=]() {
1328 qDebug() << "Home sandbox does not appear to be running, going to Entry.";
1329 DependencyManager::get<AddressManager>()->goToEntry();
1330 });
1331 } else {
1328 DependencyManager::get<AddressManager>()->goToEntry();1332 DependencyManager::get<AddressManager>()->goToEntry();
1329 });1333 }
1330 } else {1334 } else {
1331 qDebug() << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);1335 qDebug() << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);
1332 DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);1336 DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);