From 9a517d7257099a5bae49772e3c6f913ab68c836b Mon Sep 17 00:00:00 2001 From: Ryan Huffman Date: Fri, 16 Dec 2016 15:40:54 -0800 Subject: [PATCH] Update req tutorial version for Oculus Touch --- interface/src/Application.cpp | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index 93ce3a75b1..ffb8b8e8d5 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1417,20 +1417,31 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo } qCDebug(interfaceapp) << "Server content version: " << contentVersion; - bool hasTutorialContent = contentVersion >= 1; + static const int MIN_VIVE_CONTENT_VERSION = 1; + static const int MIN_OCULUS_TOUCH_CONTENT_VERSION = 27; + + bool hasSufficientTutorialContent = false; + bool hasHandControllers = false; + + // Only specific hand controllers are currently supported, so only send users to the tutorial + // if they have one of those hand controllers. + if (PluginUtils::isViveControllerAvailable()) { + hasHandControllers = true; + hasSufficientTutorialContent = contentVersion >= MIN_VIVE_CONTENT_VERSION; + } else if (PluginUtils::isOculusTouchControllerAvailable()) { + hasHandControllers = true; + hasSufficientTutorialContent = contentVersion >= MIN_OCULUS_TOUCH_CONTENT_VERSION; + } Setting::Handle firstRun { Settings::firstRun, true }; - // Only specific hand controllers are currently supported, so only send users to the tutorial - // if they one of those. - bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() - && (PluginUtils::isViveControllerAvailable() || PluginUtils::isOculusTouchControllerAvailable()); + bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && hasHandControllers; Setting::Handle tutorialComplete { "tutorialComplete", false }; - bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get(); + bool shouldGoToTutorial = hasHMDAndHandControllers && hasSufficientTutorialContent && !tutorialComplete.get(); qCDebug(interfaceapp) << "Has HMD + Hand Controllers: " << hasHMDAndHandControllers << ", current plugin: " << _displayPlugin->getName(); - qCDebug(interfaceapp) << "Has tutorial content: " << hasTutorialContent; + qCDebug(interfaceapp) << "Has sufficient tutorial content (" << contentVersion << ") : " << hasSufficientTutorialContent; qCDebug(interfaceapp) << "Tutorial complete: " << tutorialComplete.get(); qCDebug(interfaceapp) << "Should go to tutorial: " << shouldGoToTutorial;