MCPcopy Create free account
hub / github.com/LibreVR/Revive / launchApplication

Method launchApplication

ReviveOverlay/revivemanifestcontroller.cpp:400–431  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398}
399
400bool CReviveManifestController::launchApplication(const QString &canonicalName)
401{
402 qDebug("Launching application: %s", qUtf8Printable(canonicalName));
403 QString appKey = AppPrefix + canonicalName;
404 QStringList multiplayerAppKeys = {"facebook-vr-facebook-horizon", "gunslinger-games-lls-fos", "harmonix-dance-central-vr",
405 "hidden-path-entertainment-brass-tactics", "hidden-path-entertainment-phoenix", "insomniac-games-i-28",
406 "ready-at-dawn-echo-arena", "twisted-pixel-games-path-of-the-warrior"};
407
408 if (multiplayerAppKeys.indexOf(canonicalName) != -1 && !COculusOauthTokenController::SharedInstance()->Connected())
409 CTrayIconController::SharedInstance()->ShowInformation(TrayInfo_OculusAccessTokenNotFound);
410
411 if (!m_bUseOpenXR && vr::VRApplications())
412 {
413 // Refresh the manifest after launching the application to aid application identification
414 vr::EVRApplicationError error = vr::VRApplications()->LaunchApplication(qPrintable(appKey));
415 if (error == vr::VRApplicationError_None)
416 return AddApplicationManifest(m_manifestFile);
417 else
418 qWarning("Failed to launch application through OpenVR, falling back to injector: %s (%s)", qUtf8Printable(appKey), vr::VRApplications()->GetApplicationsErrorNameFromEnum(error));
419 }
420
421 if (LaunchSupportApp(appKey))
422 return true;
423
424 // Search for the app in the cached manifest
425 for (QJsonValue app : m_manifest["applications"].toArray())
426 {
427 if (app["app_key"].toString() == appKey)
428 return LaunchInjector(app["arguments"].toString());
429 }
430 return false;
431}
432
433bool CReviveManifestController::isApplicationInstalled(const QString &canonicalName)
434{

Callers

nothing calls this directly

Calls 2

ConnectedMethod · 0.80
ShowInformationMethod · 0.80

Tested by

no test coverage detected