determine vrinput manifest path dynamically

This commit is contained in:
Robin Appelman
2019-01-19 16:42:02 +01:00
committed by Vasily
parent 5accfd478a
commit 586ee558c4
2 changed files with 6 additions and 4 deletions
+6 -2
View File
@@ -1,6 +1,7 @@
#include "steamivrinput.h"
#include <openvr.h>
#include <iostream>
#include <QStandardPaths>
void SteamIVRInput::Init( const bool init )
{
@@ -14,8 +15,11 @@ void SteamIVRInput::Init( const bool init )
}
}
auto error
= vr::VRInput()->SetActionManifestPath( m_actionManifestPath.c_str() );
QString manifestPath
= QStandardPaths::locate( QStandardPaths::AppDataLocation,
QStringLiteral( "action_manifest.json" ) );
auto error = vr::VRInput()->SetActionManifestPath(
manifestPath.toStdString().c_str() );
if ( error != vr::EVRInputError::VRInputError_None )
{
std::cout << "Action manifest error\n";
-2
View File
@@ -11,8 +11,6 @@ public:
bool nextSongSet();
private:
const std::string m_actionManifestPath
= "YOUR_PATH_HERE\\action_manifest.json";
vr::VRActionHandle_t m_nextSongHandler = {};
vr::VRActionSetHandle_t m_mainSetHandler = {};
vr::VRActiveActionSet_t m_activeActionSet = {};