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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -39,6 +39,9 @@ class SteamVRTabController : public QObject
|
||||
bool allowSupersampleOverride READ allowSupersampleOverride WRITE
|
||||
setAllowSupersampleOverride NOTIFY allowSupersampleOverrideChanged )
|
||||
|
||||
Q_PROPERTY( bool performanceGraph READ performanceGraph WRITE
|
||||
setPerformanceGraph NOTIFY performanceGraphChanged )
|
||||
|
||||
private:
|
||||
OverlayController* parent;
|
||||
QQuickWindow* widget;
|
||||
@@ -47,6 +50,7 @@ private:
|
||||
bool m_motionSmoothing = true;
|
||||
bool m_allowSupersampleFiltering = true;
|
||||
bool m_allowSupersampleOverride = false;
|
||||
bool m_performanceGraphToggle = false;
|
||||
|
||||
void initMotionSmoothing();
|
||||
void initSupersampleOverride();
|
||||
@@ -65,6 +69,7 @@ public:
|
||||
bool motionSmoothing() const;
|
||||
bool allowSupersampleFiltering() const;
|
||||
bool allowSupersampleOverride() const;
|
||||
bool performanceGraph() const;
|
||||
|
||||
void reloadSteamVRProfiles();
|
||||
void saveSteamVRProfiles();
|
||||
@@ -77,6 +82,7 @@ public slots:
|
||||
void setMotionSmoothing( bool value, bool notify = true );
|
||||
void setAllowSupersampleFiltering( bool value, bool notify = true );
|
||||
void setAllowSupersampleOverride( bool value, bool notify = true );
|
||||
void setPerformanceGraph( bool value, bool notify = true );
|
||||
|
||||
void addSteamVRProfile( QString name,
|
||||
bool includeSupersampling,
|
||||
@@ -93,6 +99,7 @@ signals:
|
||||
void motionSmoothingChanged( bool value );
|
||||
void allowSupersampleFilteringChanged( bool value );
|
||||
void allowSupersampleOverrideChanged( bool value );
|
||||
void performanceGraphChanged( bool value );
|
||||
|
||||
void steamVRProfilesUpdated();
|
||||
void steamVRProfileAdded();
|
||||
|
||||
@@ -172,4 +172,4 @@ void VideoTabController::setOpacityValue()
|
||||
}
|
||||
emit brightnessValueChanged( m_brightnessValue );
|
||||
}
|
||||
} // namespace advsettings
|
||||
} // namespace advsettings
|
||||
|
||||
Reference in New Issue
Block a user