Skip to content

Commit

Permalink
ReviveOverlay: Fix non-functional OpenXR checkbox.
Browse files Browse the repository at this point in the history
  • Loading branch information
CrossVR committed Aug 11, 2019
1 parent 0269d6c commit 02d791a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 5 additions & 5 deletions ReviveOverlay/revivemanifestcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ bool CReviveManifestController::LaunchInjector(const QString& args)
// Launch the injector with the arguments
QProcess injector;
injector.setProgram(QCoreApplication::applicationDirPath() + "/Revive/ReviveInjector_x64.exe");
injector.setNativeArguments(args);
if (m_OpenXREnabled)
injector.setNativeArguments("/xr " + args);
else
injector.setNativeArguments(args);
injector.start();

if (!injector.waitForFinished())
Expand All @@ -348,10 +351,7 @@ bool CReviveManifestController::LaunchSupportApp(const QString& appKey)
if (!m_supportArgs.contains(appKey))
return false;

QString args = m_supportArgs[appKey];
if (m_OpenXREnabled)
args = "/xr " + args;
return LaunchInjector(args);
return LaunchInjector(m_supportArgs[appKey]);
}

bool CReviveManifestController::launchApplication(const QString &canonicalName)
Expand Down
4 changes: 3 additions & 1 deletion ReviveOverlay/trayiconcontroller.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ CTrayIconController::~CTrayIconController()
bool CTrayIconController::Init()
{
m_trayIcon = std::make_unique<QSystemTrayIcon>(QIcon(":/revive_white.ico"));
m_trayIconMenu.addAction("Enable OpenXR support", this, SLOT(openxr()))->setCheckable(true);
QAction* action = m_trayIconMenu.addAction("Enable OpenXR support");
action->setCheckable(true);
QObject::connect(action, SIGNAL(triggered(bool)), this, SLOT(openxr(bool)));
m_trayIconMenu.addSeparator();
m_trayIconMenu.addAction("&Inject...", this, SLOT(inject()));
m_trayIconMenu.addAction("&Patch...", this, SLOT(patch()));
Expand Down

0 comments on commit 02d791a

Please sign in to comment.