History

Merge branch 'master' of https://github.com/highfidelity/hifi into brown

samcake committed 9 years ago

Commit 0a3c1712 parents 8a2837e 142739e21 files · +205 −101Browse files

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

Unified · Split

interface/src/Application.cpp+32−4
@@ -2413,15 +2413,16 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 2412 unmodified lines
24132413
24142414 // Check HMD use (may be technically available without being in use)
24152415 bool hasHMD = PluginUtils::isHMDAvailable();
2416− bool isUsingHMD = hasHMD && hasHandControllers && _displayPlugin->isHmd();
2416+ bool isUsingHMD = _displayPlugin->isHmd();
2417+ bool isUsingHMDAndHandControllers = hasHMD && hasHandControllers && isUsingHMD;
24172418
24182419 Setting::Handle<bool> tutorialComplete{ "tutorialComplete", false };
24192420 Setting::Handle<bool> firstRun{ Settings::firstRun, true };
24202421
24212422 bool isTutorialComplete = tutorialComplete.get();
2422− bool shouldGoToTutorial = isUsingHMD && hasTutorialContent && !isTutorialComplete;
2423+ bool shouldGoToTutorial = isUsingHMDAndHandControllers && hasTutorialContent && !isTutorialComplete;
24232424
2424− qCDebug(interfaceapp) << "HMD:" << hasHMD << ", Hand Controllers: " << hasHandControllers << ", Using HMD: " << isUsingHMD;
2425+ qCDebug(interfaceapp) << "HMD:" << hasHMD << ", Hand Controllers: " << hasHandControllers << ", Using HMD: " << isUsingHMDAndHandControllers;
24252426 qCDebug(interfaceapp) << "Tutorial version:" << contentVersion << ", sufficient:" << hasTutorialContent <<
24262427 ", complete:" << isTutorialComplete << ", should go:" << shouldGoToTutorial;
24272428
@@ -2435,10 +2436,18 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 7 unmodified lines
24352436
24362437 const QString TUTORIAL_PATH = "/tutorial_begin";
24372438
2439+ static const QString SENT_TO_TUTORIAL = "tutorial";
2440+ static const QString SENT_TO_PREVIOUS_LOCATION = "previous_location";
2441+ static const QString SENT_TO_ENTRY = "entry";
2442+ static const QString SENT_TO_SANDBOX = "sandbox";
2443+
2444+ QString sentTo;
2445+
24382446 if (shouldGoToTutorial) {
24392447 if (sandboxIsRunning) {
24402448 qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home.";
24412449 DependencyManager::get<AddressManager>()->goToLocalSandbox(TUTORIAL_PATH);
2450+ sentTo = SENT_TO_TUTORIAL;
24422451 } else {
24432452 qCDebug(interfaceapp) << "Home sandbox does not appear to be running, going to Entry.";
24442453 if (firstRun.get()) {
@@ -2446,8 +2455,10 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 1 unmodified line
24462455 }
24472456 if (addressLookupString.isEmpty()) {
24482457 DependencyManager::get<AddressManager>()->goToEntry();
2458+ sentTo = SENT_TO_ENTRY;
24492459 } else {
24502460 DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
2461+ sentTo = SENT_TO_PREVIOUS_LOCATION;
24512462 }
24522463 }
24532464 } else {
@@ -2460,23 +2471,40 @@ void Application::handleSandboxStatus(QNetworkReply* reply) { · 6 unmodified lines
24602471
24612472 // If this is a first run we short-circuit the address passed in
24622473 if (isFirstRun) {
2463− if (isUsingHMD) {
2474+ if (isUsingHMDAndHandControllers) {
24642475 if (sandboxIsRunning) {
24652476 qCDebug(interfaceapp) << "Home sandbox appears to be running, going to Home.";
24662477 DependencyManager::get<AddressManager>()->goToLocalSandbox();
2478+ sentTo = SENT_TO_SANDBOX;
24672479 } else {
24682480 qCDebug(interfaceapp) << "Home sandbox does not appear to be running, going to Entry.";
24692481 DependencyManager::get<AddressManager>()->goToEntry();
2482+ sentTo = SENT_TO_ENTRY;
24702483 }
24712484 } else {
24722485 DependencyManager::get<AddressManager>()->goToEntry();
2486+ sentTo = SENT_TO_ENTRY;
24732487 }
24742488 } else {
24752489 qCDebug(interfaceapp) << "Not first run... going to" << qPrintable(addressLookupString.isEmpty() ? QString("previous location") : addressLookupString);
24762490 DependencyManager::get<AddressManager>()->loadSettings(addressLookupString);
2491+ sentTo = SENT_TO_PREVIOUS_LOCATION;
24772492 }
24782493 }
24792494
2495+ UserActivityLogger::getInstance().logAction("startup_sent_to", {
2496+ { "sent_to", sentTo },
2497+ { "sandbox_is_running", sandboxIsRunning },
2498+ { "has_hmd", hasHMD },
2499+ { "has_hand_controllers", hasHandControllers },
2500+ { "is_using_hmd", isUsingHMD },
2501+ { "is_using_hmd_and_hand_controllers", isUsingHMDAndHandControllers },
2502+ { "content_version", contentVersion },
2503+ { "is_tutorial_complete", isTutorialComplete },
2504+ { "has_tutorial_content", hasTutorialContent },
2505+ { "should_go_to_tutorial", shouldGoToTutorial }
2506+ });
2507+
24802508 _connectionMonitor.init();
24812509
24822510 // After all of the constructor is completed, then set firstRun to false.