determine vrinput manifest path dynamically
This commit is contained in:
@@ -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";
|
||||
|
||||
@@ -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 = {};
|
||||
|
||||
Reference in New Issue
Block a user