Ssbugs, removal of re-vive, and dashboard loop tick (#277)

* minor changes

* debugging testing

* removed un-needed log calls

* moved some logic to run only when dashboard is active

* fixed linker error

* added casting

* removed revive tab

* removed stray revive reference

* removed revive from sources

* fixed misc formatting issues

* added newline
This commit is contained in:
ykeara
2019-08-22 13:40:48 -05:00
committed by GitHub
parent 1b5e092cc2
commit 746aa23207
18 changed files with 108 additions and 2834 deletions
+7 -17
View File
@@ -137,8 +137,6 @@ OverlayController::OverlayController( bool desktopMode,
m_moveCenterTabController.initStage1();
m_audioTabController.initStage1();
m_settingsTabController.initStage1();
m_reviveTabController.initStage1(
m_settingsTabController.forceRevivePage() );
m_utilitiesTabController.initStage1();
m_videoTabController.initStage1();
@@ -250,16 +248,6 @@ OverlayController::OverlayController( bool desktopMode,
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
return obj;
} );
qmlRegisterSingletonType<SteamVRTabController>(
qmlSingletonImportName,
1,
0,
"ReviveTabController",
[]( QQmlEngine*, QJSEngine* ) {
QObject* obj = &( objectAddress->m_reviveTabController );
QQmlEngine::setObjectOwnership( obj, QQmlEngine::CppOwnership );
return obj;
} );
qmlRegisterSingletonType<SteamVRTabController>(
qmlSingletonImportName,
1,
@@ -488,7 +476,6 @@ void OverlayController::SetWidget( QQuickItem* quickItem,
m_audioTabController.initStage2();
m_statisticsTabController.initStage2( this );
m_settingsTabController.initStage2( this );
m_reviveTabController.initStage2( this );
m_utilitiesTabController.initStage2( this );
m_moveCenterTabController.initStage2( this );
}
@@ -1055,16 +1042,19 @@ void OverlayController::mainEventLoop()
m_moveCenterTabController.eventLoopTick(
vr::VRCompositor()->GetTrackingSpace(), devicePoses );
m_utilitiesTabController.eventLoopTick();
m_fixFloorTabController.eventLoopTick( devicePoses );
m_statisticsTabController.eventLoopTick(
devicePoses, leftSpeed, rightSpeed );
m_steamVRTabController.eventLoopTick();
m_chaperoneTabController.eventLoopTick(
devicePoses, leftSpeed, rightSpeed, hmdSpeed );
m_settingsTabController.eventLoopTick();
m_reviveTabController.eventLoopTick();
m_audioTabController.eventLoopTick();
if ( vr::VROverlay()->IsDashboardVisible() )
{
m_settingsTabController.dashboardLoopTick();
m_steamVRTabController.dashboardLoopTick();
m_fixFloorTabController.dashboardLoopTick( devicePoses );
}
if ( m_ulOverlayThumbnailHandle != vr::k_ulOverlayHandleInvalid )
{
while ( vr::VROverlay()->PollNextOverlayEvent(
-3
View File
@@ -35,7 +35,6 @@
#include "tabcontrollers/AudioTabController.h"
#include "tabcontrollers/StatisticsTabController.h"
#include "tabcontrollers/SettingsTabController.h"
#include "tabcontrollers/ReviveTabController.h"
#include "tabcontrollers/UtilitiesTabController.h"
#include "tabcontrollers/VideoTabController.h"
@@ -65,7 +64,6 @@ namespace advsettings
constexpr int k_audioSettingsUpdateCounter = 89;
constexpr int k_chaperoneSettingsUpdateCounter = 101;
constexpr int k_moveCenterSettingsUpdateCounter = 83;
constexpr int k_reviveSettingsUpdateCounter = 139;
constexpr int k_settingsTabSettingsUpdateCounter = 157;
constexpr int k_steamVrSettingsUpdateCounter = 97;
constexpr int k_utilitiesSettingsUpdateCounter = 19;
@@ -131,7 +129,6 @@ public: // I know it's an ugly hack to make them public to enable external
AudioTabController m_audioTabController;
StatisticsTabController m_statisticsTabController;
SettingsTabController m_settingsTabController;
ReviveTabController m_reviveTabController;
UtilitiesTabController m_utilitiesTabController;
VideoTabController m_videoTabController;
overlay::DesktopOverlay m_desktopOverlay;
File diff suppressed because it is too large Load Diff
-18
View File
@@ -103,18 +103,6 @@ MyStackViewPage {
}
}
MyPushButton {
id: reviveButton
activationSoundEnabled: false
text: "Revive"
Layout.fillWidth: true
visible: SettingsTabController.forceRevivePage ? true : ReviveTabController.isOverlayInstalled
onClicked: {
MyResources.playFocusChangedSound()
mainView.push(revivePage)
}
}
MyPushButton {
id: utilitiesButton
activationSoundEnabled: false
@@ -467,12 +455,6 @@ MyStackViewPage {
}
}
Connections {
target: SettingsTabController
onForceRevivePageChanged: {
reviveButton.visible = SettingsTabController.forceRevivePage ? true : ReviveTabController.isOverlayInstalled
}
}
function updateStatistics() {
var rotations = StatisticsTabController.hmdRotations
-12
View File
@@ -18,14 +18,6 @@ MyStackViewPage {
}
}
MyToggleButton {
id: forceReviveToggle
text: "Force Revive Page"
onCheckedChanged: {
SettingsTabController.setForceRevivePage(checked, true)
}
}
MyToggleButton {
id: allowExternalEditsToggle
text: "Allow External App Chaperone Edits (Danger)"
@@ -111,7 +103,6 @@ MyStackViewPage {
Component.onCompleted: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
forceReviveToggle.checked = SettingsTabController.forceRevivePage
allowExternalEditsToggle.checked = MoveCenterTabController.allowExternalEdits
oldStyleMotionToggle.checked = MoveCenterTabController.oldStyleMotion
@@ -129,9 +120,6 @@ MyStackViewPage {
onAutoStartEnabledChanged: {
settingsAutoStartToggle.checked = SettingsTabController.autoStartEnabled
}
onForceRevivePageChanged: {
forceReviveToggle.checked = SettingsTabController.forceRevivePage
}
}
Connections {
+10 -9
View File
@@ -200,12 +200,10 @@ MyStackViewPage {
value: 1.0
snapMode: Slider.SnapAlways
Layout.fillWidth: true
onPositionChanged: {
var val = this.from + ( this.position * (this.to - this.from))
steamvrSupersamplingText.text = val.toFixed(1)
}
onValueChanged: {
SteamVRTabController.setSuperSampling(this.value.toFixed(1), false)
var val = this.value
steamvrSupersamplingText.text = val.toFixed(1)
SteamVRTabController.setSuperSampling(this.value.toFixed(1), true)
}
}
@@ -244,9 +242,11 @@ MyStackViewPage {
}
MyToggleButton {
id: steamvrAllowSupersampleOverrideToggle
text: "Enable Manual Supersampling Override"
text: "Enable Manual Supersampling Override: (refresh dashboard to take effect)"
onCheckedChanged: {
SteamVRTabController.setAllowSupersampleOverride(this.checked, false)
SteamVRTabController.setSuperSampling(steamvrSupersamplingSlider.value, true)
steamvrSupersamplingText.text = SteamVRTabController.superSampling.toFixed(1)
if(!this.checked){
steamvrSupersamplingText.enabled = false
steamvrSupersamplingSlider.enabled = false
@@ -333,13 +333,14 @@ MyStackViewPage {
target: SteamVRTabController
onSuperSamplingChanged: {
var s1 = SteamVRTabController.superSampling.toFixed(1)
if (s1 <= steamvrSupersamplingSlider.to && Math.abs(steamvrSupersamplingSlider.value-s1) > 0.08) {
steamvrSupersamplingSlider.value = s1
}
steamvrSupersamplingSlider.value = s1
steamvrSupersamplingText.text = s1
}
onAllowSupersampleOverrideChanged: {
steamvrAllowSupersampleOverrideToggle.checked = SteamVRTabController.allowSupersampleOverride
var s1 = SteamVRTabController.superSampling.toFixed(1)
steamvrSupersamplingSlider.value = s1
steamvrSupersamplingText.text = s1
}
onAllowSupersampleFilteringChanged: {
steamvrAllowSupersampleFilteringToggle.checked = SteamVRTabController.allowSupersampleFiltering
-5
View File
@@ -64,11 +64,6 @@ Rectangle {
visible: false
}
property RevivePage revivePage: RevivePage {
stackView: mainView
visible: false
}
property UtilitiesPage utilitiesPage: UtilitiesPage {
stackView: mainView
visible: false
+1 -1
View File
@@ -10,7 +10,7 @@ void FixFloorTabController::initStage2( OverlayController* var_parent )
this->parent = var_parent;
}
void FixFloorTabController::eventLoopTick(
void FixFloorTabController::dashboardLoopTick(
vr::TrackedDevicePose_t* devicePoses )
{
if ( state > 0 )
@@ -56,6 +56,7 @@ public:
void initStage2( OverlayController* parent );
void eventLoopTick( vr::TrackedDevicePose_t* devicePoses );
void dashboardLoopTick( vr::TrackedDevicePose_t* devicePoses );
Q_INVOKABLE QString currentStatusMessage();
Q_INVOKABLE float currentStatusMessageTimeout();
File diff suppressed because it is too large Load Diff
-199
View File
@@ -1,199 +0,0 @@
#pragma once
#include <QObject>
class QQuickWindow;
// application namespace
namespace advsettings
{
// forward declaration
class OverlayController;
struct ReviveControllerProfile
{
std::string profileName;
int gripButtonMode;
bool triggerAsGrip;
float thumbDeadzone;
float thumbRange;
float touchPitch;
float touchYaw;
float touchRoll;
float touchX;
float touchY;
float touchZ;
};
class ReviveTabController : public QObject
{
Q_OBJECT
Q_PROPERTY( int isOverlayInstalled READ isOverlayInstalled NOTIFY
isOverlayInstalledChanged )
Q_PROPERTY( int gripButtonMode READ gripButtonMode WRITE setGripButtonMode
NOTIFY gripButtonModeChanged )
Q_PROPERTY( int triggerAsGrip READ triggerAsGrip WRITE setTriggerAsGrip
NOTIFY triggerAsGripChanged )
Q_PROPERTY( bool pixelsPerDisplayPixelOverrideEnabled READ
isPixelsPerDisplayPixelOverrideEnabled WRITE
setPixelsPerDisplayPixelOverrideEnabled NOTIFY
pixelsPerDisplayPixelOverrideEnabledChanged )
Q_PROPERTY( float toggleDelay READ toggleDelay WRITE setToggleDelay NOTIFY
toggleDelayChanged )
Q_PROPERTY(
float pixelsPerDisplayPixelOverride READ pixelsPerDisplayPixelOverride
WRITE setPixelsPerDisplayPixelOverride NOTIFY
pixelsPerDisplayPixelOverrideChanged )
Q_PROPERTY( float thumbDeadzone READ thumbDeadzone WRITE setThumbDeadzone
NOTIFY thumbDeadzoneChanged )
Q_PROPERTY( float thumbRange READ thumbRange WRITE setThumbRange NOTIFY
thumbRangeChanged )
Q_PROPERTY( float touchPitch READ touchPitch WRITE setTouchPitch NOTIFY
touchPitchChanged )
Q_PROPERTY(
float touchYaw READ touchYaw WRITE setTouchYaw NOTIFY touchYawChanged )
Q_PROPERTY( float touchRoll READ touchRoll WRITE setTouchRoll NOTIFY
touchRollChanged )
Q_PROPERTY( float touchX READ touchX WRITE setTouchX NOTIFY touchXChanged )
Q_PROPERTY( float touchY READ touchY WRITE setTouchY NOTIFY touchYChanged )
Q_PROPERTY( float touchZ READ touchZ WRITE setTouchZ NOTIFY touchZChanged )
Q_PROPERTY( float piPlayerHeight READ piPlayerHeight WRITE setPiPlayerHeight
NOTIFY piPlayerHeightChanged )
Q_PROPERTY( float piEyeHeight READ piEyeHeight WRITE setPiEyeHeight NOTIFY
piEyeHeightChanged )
Q_PROPERTY( QString piUsername READ piUsername WRITE setPiUsername NOTIFY
piUsernameChanged )
Q_PROPERTY(
QString piName READ piName WRITE setPiName NOTIFY piNameChanged )
Q_PROPERTY(
int piGender READ piGender WRITE setPiGender NOTIFY piGenderChanged )
private:
OverlayController* parent;
bool m_isOverlayInstalled = false;
int m_gripButtonMode = 0;
float m_toggleDelay = 0.5f;
bool m_triggerAsGrip = false;
bool m_pixelsPerDisplayPixelOverrideEnabled = false;
float m_pixelsPerDisplayPixelOverride = 1.0f;
float m_thumbDeadzone = 0.3f;
float m_thumbRange = 2.0f;
float m_touchPitch = -28.0f;
float m_touchYaw = 0.0f;
float m_touchRoll = -14.0f;
float m_touchX = 0.016f;
float m_touchY = -0.036f;
float m_touchZ = 0.016f;
float m_piPlayerHeight = 1.778f;
float m_piEyeHeight = 1.675f;
QString m_piUsername = "";
QString m_piName = "";
int m_piGender = 0; // 0 .. Unknown, 1 .. Male, 2 .. Female
unsigned settingsUpdateCounter = 0;
std::vector<ReviveControllerProfile> controllerProfiles;
public:
void initStage1( bool forceRevivePage );
void initStage2( OverlayController* parent );
void eventLoopTick();
bool isOverlayInstalled() const;
int gripButtonMode() const;
bool triggerAsGrip() const;
float toggleDelay() const;
bool isPixelsPerDisplayPixelOverrideEnabled() const;
float pixelsPerDisplayPixelOverride() const;
float thumbDeadzone() const;
float thumbRange() const;
float touchPitch() const;
float touchYaw() const;
float touchRoll() const;
float touchX() const;
float touchY() const;
float touchZ() const;
float piPlayerHeight() const;
float piEyeHeight() const;
const QString& piUsername() const;
const QString& piName() const;
int piGender() const; // 0 .. Unknown, 1 .. Male, 2 .. Female
Q_INVOKABLE float getCurrentHMDHeight();
void reloadControllerProfiles();
void saveControllerProfiles();
Q_INVOKABLE unsigned getControllerProfileCount();
Q_INVOKABLE QString getControllerProfileName( unsigned index );
public slots:
void setGripButtonMode( int value, bool notify = true );
void setTriggerAsGrip( bool value, bool notify = true );
void setToggleDelay( float value, bool notify = true );
void setPixelsPerDisplayPixelOverrideEnabled( bool value,
bool notify = true );
void setPixelsPerDisplayPixelOverride( float value, bool notify = true );
void setThumbDeadzone( float value, bool notify = true );
void setThumbRange( float value, bool notify = true );
void setTouchPitch( float value, bool notify = true );
void setTouchYaw( float value, bool notify = true );
void setTouchRoll( float value, bool notify = true );
void setTouchX( float value, bool notify = true );
void setTouchY( float value, bool notify = true );
void setTouchZ( float value, bool notify = true );
void setPiPlayerHeight( float value, bool notify = true );
void setPiEyeHeight( float value, bool notify = true );
void setPiUsername( const QString& value, bool notify = true );
void setPiName( const QString& value, bool notify = true );
void setPiGender( int value,
bool notify
= true ); // 0 .. Unknown, 1 .. Male, 2 .. Female
void addControllerProfile( QString name );
void applyControllerProfile( unsigned index );
void deleteControllerProfile( unsigned index );
void reset();
signals:
void isOverlayInstalledChanged( bool value );
void gripButtonModeChanged( int value );
void triggerAsGripChanged( bool value );
void toggleDelayChanged( float value );
void pixelsPerDisplayPixelOverrideEnabledChanged( bool value );
void pixelsPerDisplayPixelOverrideChanged( float value );
void thumbDeadzoneChanged( float value );
void thumbRangeChanged( float value );
void touchPitchChanged( float value );
void touchYawChanged( float value );
void touchRollChanged( float value );
void touchXChanged( float value );
void touchYChanged( float value );
void touchZChanged( float value );
void piPlayerHeightChanged( float value );
void piEyeHeightChanged( float value );
void piUsernameChanged( const QString& value );
void piNameChanged( const QString& value );
void piGenderChanged( int value );
void controllerProfilesUpdated();
};
} // namespace advsettings
+3 -36
View File
@@ -9,14 +9,6 @@ void SettingsTabController::initStage1()
{
m_autoStartEnabled = vr::VRApplications()->GetApplicationAutoLaunch(
application_strings::applicationKey );
auto settings = OverlayController::appSettings();
settings->beginGroup( "applicationSettings" );
auto value = settings->value( "forceRevivePage", m_forceRevivePage );
settings->endGroup();
if ( value.isValid() && !value.isNull() )
{
m_forceRevivePage = value.toBool();
}
}
void SettingsTabController::initStage2( OverlayController* var_parent )
@@ -24,15 +16,12 @@ void SettingsTabController::initStage2( OverlayController* var_parent )
this->parent = var_parent;
}
void SettingsTabController::eventLoopTick()
void SettingsTabController::dashboardLoopTick()
{
if ( settingsUpdateCounter >= k_settingsTabSettingsUpdateCounter )
{
if ( parent->isDashboardVisible() )
{
setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch(
application_strings::applicationKey ) );
}
setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch(
application_strings::applicationKey ) );
settingsUpdateCounter = 0;
}
else
@@ -66,26 +55,4 @@ void SettingsTabController::setAutoStartEnabled( bool value, bool notify )
}
}
bool SettingsTabController::forceRevivePage() const
{
return m_forceRevivePage;
}
void SettingsTabController::setForceRevivePage( bool value, bool notify )
{
if ( m_forceRevivePage != value )
{
m_forceRevivePage = value;
auto settings = OverlayController::appSettings();
settings->beginGroup( "applicationSettings" );
settings->setValue( "forceRevivePage", m_forceRevivePage );
settings->endGroup();
settings->sync();
if ( notify )
{
emit forceRevivePageChanged( m_forceRevivePage );
}
}
}
} // namespace advsettings
+1 -7
View File
@@ -15,8 +15,6 @@ class SettingsTabController : public QObject
Q_OBJECT
Q_PROPERTY( bool autoStartEnabled READ autoStartEnabled WRITE
setAutoStartEnabled NOTIFY autoStartEnabledChanged )
Q_PROPERTY( bool forceRevivePage READ forceRevivePage WRITE
setForceRevivePage NOTIFY forceRevivePageChanged )
private:
OverlayController* parent;
@@ -24,24 +22,20 @@ private:
unsigned settingsUpdateCounter = 0;
bool m_autoStartEnabled = false;
bool m_forceRevivePage = false;
public:
void initStage1();
void initStage2( OverlayController* parent );
void eventLoopTick();
void dashboardLoopTick();
bool autoStartEnabled() const;
bool forceRevivePage() const;
public slots:
void setAutoStartEnabled( bool value, bool notify = true );
void setForceRevivePage( bool value, bool notify = true );
signals:
void autoStartEnabledChanged( bool value );
void forceRevivePageChanged( bool value );
};
} // namespace advsettings
+84 -91
View File
@@ -9,7 +9,7 @@ void SteamVRTabController::initStage1()
{
initMotionSmoothing();
initSupersampleOverride();
eventLoopTick();
dashboardLoopTick();
reloadSteamVRProfiles();
}
@@ -18,105 +18,98 @@ void SteamVRTabController::initStage2( OverlayController* var_parent )
this->parent = var_parent;
}
void SteamVRTabController::eventLoopTick()
void SteamVRTabController::dashboardLoopTick()
{
if ( settingsUpdateCounter >= k_steamVrSettingsUpdateCounter )
{
if ( parent->isDashboardVisible() )
vr::EVRSettingsError vrSettingsError;
// checks supersampling override and resynchs if necessry
// also prints error if can't find.
auto sso = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleManualOverride_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
vr::EVRSettingsError vrSettingsError;
// checks supersampling override and resynchs if necessry
// also prints error if can't find.
auto sso = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleManualOverride_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
LOG( WARNING ) << "Could not read \""
<< vr::k_pch_SteamVR_SupersampleManualOverride_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setAllowSupersampleOverride( sso );
// checks supersampling and re-synchs if necessary
auto ss = vr::VRSettings()->GetFloat(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleScale_Float,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING ) << "Could not read \""
<< vr::k_pch_SteamVR_SupersampleScale_Float
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
if ( m_superSampling != 1.0f )
{
LOG( WARNING )
<< "Could not read \""
<< vr::k_pch_SteamVR_SupersampleManualOverride_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
LOG( DEBUG ) << "OpenVR returns an error and we have a custom "
"supersampling value: "
<< m_superSampling;
setSuperSampling( 1.0 );
}
setAllowSupersampleOverride( sso );
// checks supersampling and re-synchs if necessary
auto ss = vr::VRSettings()->GetFloat(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleScale_Float,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING )
<< "Could not read \""
<< vr::k_pch_SteamVR_SupersampleScale_Float
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
if ( m_superSampling != 1.0f )
{
LOG( DEBUG )
<< "OpenVR returns an error and we have a custom "
"supersampling value: "
<< m_superSampling;
setSuperSampling( 1.0 );
}
}
else if ( m_superSampling != ss )
{
LOG( DEBUG ) << "OpenVR reports a changed supersampling value: "
<< m_superSampling << " => " << ss;
setSuperSampling( ss );
}
// checks if Supersampling filter is on and changes if it has been
// changed elsewhere
auto sf = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING )
<< "Could not read \""
<< vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setAllowSupersampleFiltering( sf );
}
else if ( fabs( static_cast<double>( m_superSampling - ss ) ) > 0.05 )
{
LOG( INFO ) << "OpenVR reports a changed supersampling value: "
<< m_superSampling << " => " << ss;
setSuperSampling( ss );
}
// checks if Supersampling filter is on and changes if it has been
// changed elsewhere
auto sf = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING ) << "Could not read \""
<< vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setAllowSupersampleFiltering( sf );
// Checks if Motion smoothing setting can be read and synchs adv
// settings to steamvr/openvr
auto ms = vr::VRSettings()->GetBool(
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_MotionSmoothing_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING )
<< "Could not read \""
<< vr::k_pch_SteamVR_MotionSmoothing_Bool << "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setMotionSmoothing( ms );
// Checks if Motion smoothing setting can be read and synchs adv
// settings to steamvr/openvr
auto ms
= vr::VRSettings()->GetBool( vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_MotionSmoothing_Bool,
&vrSettingsError );
if ( vrSettingsError != vr::VRSettingsError_None )
{
LOG( WARNING ) << "Could not read \""
<< vr::k_pch_SteamVR_MotionSmoothing_Bool
<< "\" setting: "
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
setMotionSmoothing( ms );
// Checks and synchs performance graph
auto pg
= vr::VRSettings()->GetBool( vr::k_pch_Perf_Section,
// 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 );
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;
}
else
@@ -310,9 +303,9 @@ void SteamVRTabController::setSuperSampling( float value, const bool notify )
{
bool override = false;
// Mirrors Desktop Clamp
if ( value <= 0.2f )
if ( value < 0.2f )
{
LOG( WARNING ) << "Encountered a supersampling value <= 0.01, setting "
LOG( WARNING ) << "Encountered a supersampling value <= 0.2, setting "
"supersampling to 1.0";
value = 1.0f;
override = true;
@@ -63,6 +63,7 @@ public:
void initStage2( OverlayController* parent );
void eventLoopTick();
void dashboardLoopTick();
float superSampling() const;
bool motionSmoothing() const;
@@ -113,8 +113,6 @@ void VideoTabController::reloadVideoConfig()
setColorGreen( settings->value( "colorGreen", 0.0f ).toFloat() );
setColorBlue( settings->value( "colorBlue", 0.0f ).toFloat() );
settings->endGroup();
LOG( INFO ) << "bright opacityValue: " << m_brightnessOpacityValue
<< " REd value is: " << m_colorRed;
setBrightnessOpacityValue();
loadColorOverlay();
settings->sync();