determine vrinput manifest path dynamically
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
#include "steamivrinput.h"
|
#include "steamivrinput.h"
|
||||||
#include <openvr.h>
|
#include <openvr.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
#include <QStandardPaths>
|
||||||
|
|
||||||
void SteamIVRInput::Init( const bool init )
|
void SteamIVRInput::Init( const bool init )
|
||||||
{
|
{
|
||||||
@@ -14,8 +15,11 @@ void SteamIVRInput::Init( const bool init )
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto error
|
QString manifestPath
|
||||||
= vr::VRInput()->SetActionManifestPath( m_actionManifestPath.c_str() );
|
= QStandardPaths::locate( QStandardPaths::AppDataLocation,
|
||||||
|
QStringLiteral( "action_manifest.json" ) );
|
||||||
|
auto error = vr::VRInput()->SetActionManifestPath(
|
||||||
|
manifestPath.toStdString().c_str() );
|
||||||
if ( error != vr::EVRInputError::VRInputError_None )
|
if ( error != vr::EVRInputError::VRInputError_None )
|
||||||
{
|
{
|
||||||
std::cout << "Action manifest error\n";
|
std::cout << "Action manifest error\n";
|
||||||
|
|||||||
@@ -11,8 +11,6 @@ public:
|
|||||||
bool nextSongSet();
|
bool nextSongSet();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
const std::string m_actionManifestPath
|
|
||||||
= "YOUR_PATH_HERE\\action_manifest.json";
|
|
||||||
vr::VRActionHandle_t m_nextSongHandler = {};
|
vr::VRActionHandle_t m_nextSongHandler = {};
|
||||||
vr::VRActionSetHandle_t m_mainSetHandler = {};
|
vr::VRActionSetHandle_t m_mainSetHandler = {};
|
||||||
vr::VRActiveActionSet_t m_activeActionSet = {};
|
vr::VRActiveActionSet_t m_activeActionSet = {};
|
||||||
|
|||||||
Reference in New Issue
Block a user