Showing the changes to interface/src/Application.cpp (1 of 15 files). Show all
Unified · Split
| @@ -87,6 +87,7 @@ · 86 unmodified lines | ||
| 87 | 87 | #include <PhysicsEngine.h> |
| 88 | 88 | #include <PhysicsHelpers.h> |
| 89 | 89 | #include <plugins/PluginManager.h> |
| 90 | +#include <plugins/PluginUtils.h> | |
| 90 | 91 | #include <plugins/CodecPlugin.h> |
| 91 | 92 | #include <RecordingScriptingInterface.h> |
| 92 | 93 | #include <RenderableWebEntityItem.h> |
| @@ -1276,17 +1277,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 1183 unmodified lines | ||
| 1276 | 1277 | bool hasTutorialContent = contentVersion >= 1; |
| 1277 | 1278 | |
| 1278 | 1279 | Setting::Handle<bool> firstRun { Settings::firstRun, true }; |
| 1279 | − bool hasVive = false; | |
| 1280 | − for (auto& displayPlugin : PluginManager::getInstance()->getDisplayPlugins()) { | |
| 1281 | − if (displayPlugin->getName() == "OpenVR (Vive)") { | |
| 1282 | − hasVive = true; | |
| 1283 | − break; | |
| 1284 | − } | |
| 1285 | − } | |
| 1280 | + bool hasHMDAndHandControllers = PluginUtils::isHMDAvailable() && PluginUtils::isHandControllerAvailable(); | |
| 1286 | 1281 | Setting::Handle<bool> tutorialComplete { "tutorialComplete", false }; |
| 1287 | 1282 | |
| 1288 | − bool shouldGoToTutorial = hasVive && hasTutorialContent && !tutorialComplete.get(); | |
| 1289 | − qDebug() << "has vive: " << hasVive << ", current plugin: " << _displayPlugin->getName(); | |
| 1283 | + bool shouldGoToTutorial = hasHMDAndHandControllers && hasTutorialContent && !tutorialComplete.get(); | |
| 1284 | + | |
| 1285 | + qDebug() << "Has HMD + Hand Controllers: " << hasHMDAndHandControllers << ", current plugin: " << _displayPlugin->getName(); | |
| 1290 | 1286 | qDebug() << "has tutorial content" << hasTutorialContent; |
| 1291 | 1287 | qDebug() << "tutorial complete" << tutorialComplete.get(); |
| 1292 | 1288 | qDebug() << "should go to tutorial " << shouldGoToTutorial; |
| @@ -1300,10 +1296,12 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer) : · 7 unmodified lines | ||
| 1300 | 1296 | addressLookupString = arguments().value(urlIndex + 1); |
| 1301 | 1297 | } |
| 1302 | 1298 | |
| 1299 | + const QString TUTORIAL_PATH = "/tutorial_begin"; | |
| 1300 | + | |
| 1303 | 1301 | if (shouldGoToTutorial) { |
| 1304 | 1302 | DependencyManager::get<AddressManager>()->ifLocalSandboxRunningElse([=]() { |
| 1305 | 1303 | qDebug() << "Home sandbox appears to be running, going to Home."; |
| 1306 | − DependencyManager::get<AddressManager>()->goToLocalSandbox("/tutorial_begin"); | |
| 1304 | + DependencyManager::get<AddressManager>()->goToLocalSandbox(TUTORIAL_PATH); | |
| 1307 | 1305 | }, [=]() { |
| 1308 | 1306 | qDebug() << "Home sandbox does not appear to be running, going to Entry."; |
| 1309 | 1307 | if (firstRun.get()) { |