WMR default binding, Toggle Chaperone Action, frame timing graph, prox sensor back-end (#182)

* perf graph overlay/checkbox added

* added toggle Chaperone action

* toggle chaperone non-functional

* fixed chaperone toggle action const to once

* Added Proximity Sensor Action back-end, not implemented via logic Until fixed by valve

* added default WMR controller profile

* formated

* formated steamvrtabcontroller.h

* fixed un-intended change
This commit is contained in:
ykeara
2019-04-27 17:47:46 -05:00
committed by GitHub
parent bf5ccd69ca
commit ef67888405
12 changed files with 268 additions and 4 deletions
@@ -103,6 +103,21 @@ void SteamVRTabController::eventLoopTick()
vrSettingsError );
}
setMotionSmoothing( ms );
// Checks and synchs performance graph
auto pg
= vr::VRSettings()->GetBool( vr::k_pch_Perf_Section,
vr::k_pch_Perf_PerfGraphInHMD_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING )
<< "Could not read \"" << vr::k_pch_Perf_PerfGraphInHMD_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setPerformanceGraph( pg );
}
settingsUpdateCounter = 0;
}
@@ -447,6 +462,31 @@ void SteamVRTabController::initSupersampleOverride()
/*------------------------------------------*/
/* -----------------------------------------*/
bool SteamVRTabController::performanceGraph() const
{
return m_performanceGraphToggle;
}
void SteamVRTabController::setPerformanceGraph( const bool value,
const bool notify )
{
if ( m_performanceGraphToggle != value )
{
m_performanceGraphToggle = value;
vr::VRSettings()->SetBool( vr::k_pch_Perf_Section,
vr::k_pch_Perf_PerfGraphInHMD_Bool,
m_performanceGraphToggle );
vr::VRSettings()->Sync();
if ( notify )
{
emit performanceGraphChanged( m_performanceGraphToggle );
}
}
}
/*------------------------------------------*/
/* -----------------------------------------*/
void SteamVRTabController::reset()
{
vr::EVRSettingsError vrSettingsError;
@@ -516,6 +556,17 @@ void SteamVRTabController::reset()
vrSettingsError );
}
vr::VRSettings()->RemoveKeyInSection( vr::k_pch_Perf_Section,
vr::k_pch_Perf_PerfGraphInHMD_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING ) << "Could not remove \""
<< vr::k_pch_Perf_PerfGraphInHMD_Bool << "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
vr::VRSettings()->Sync();
settingsUpdateCounter = 999; // Easiest way to get default values
}