Implemented vsync tick for event loops
This commit is contained in:
@@ -116,9 +116,12 @@ void AccessibilityTabController::eventLoopTick(
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 151 )
|
||||
{
|
||||
setTrackingUniverse( ( int ) universe );
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
setTrackingUniverse( ( int ) universe );
|
||||
}
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -167,7 +167,7 @@ void AudioTabController::eventLoopTick()
|
||||
{
|
||||
return;
|
||||
}
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 89 )
|
||||
{
|
||||
if ( m_micProximitySensorCanMute )
|
||||
{
|
||||
|
||||
@@ -649,66 +649,72 @@ void ChaperoneTabController::eventLoopTick(
|
||||
}
|
||||
}
|
||||
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 101 )
|
||||
{
|
||||
vr::EVRSettingsError vrSettingsError;
|
||||
float vis = vr::VRSettings()->GetInt32(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_ColorGammaA_Int32,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
LOG( WARNING ) << "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_ColorGammaA_Int32
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setBoundsVisibility( vis / 255.0f );
|
||||
if ( m_chaperoneVelocityModifierCurrent == 1.0f )
|
||||
{
|
||||
auto fd = vr::VRSettings()->GetFloat(
|
||||
vr::EVRSettingsError vrSettingsError;
|
||||
float vis = vr::VRSettings()->GetInt32(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_FadeDistance_Float,
|
||||
vr::k_pch_CollisionBounds_ColorGammaA_Int32,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING )
|
||||
<< "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_FadeDistance_Float
|
||||
<< vr::k_pch_CollisionBounds_ColorGammaA_Int32
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setFadeDistance( fd );
|
||||
setBoundsVisibility( vis / 255.0f );
|
||||
if ( m_chaperoneVelocityModifierCurrent == 1.0f )
|
||||
{
|
||||
auto fd = vr::VRSettings()->GetFloat(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_FadeDistance_Float,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING )
|
||||
<< "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_FadeDistance_Float
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setFadeDistance( fd );
|
||||
}
|
||||
auto cm = vr::VRSettings()->GetBool(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_CenterMarkerOn_Bool,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING )
|
||||
<< "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_CenterMarkerOn_Bool
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setCenterMarker( cm );
|
||||
auto ps = vr::VRSettings()->GetBool(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_PlaySpaceOn_Bool,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING )
|
||||
<< "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_PlaySpaceOn_Bool
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setPlaySpaceMarker( ps );
|
||||
updateHeight( getBoundsMaxY() );
|
||||
}
|
||||
auto cm = vr::VRSettings()->GetBool(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_CenterMarkerOn_Bool,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING ) << "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_CenterMarkerOn_Bool
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setCenterMarker( cm );
|
||||
auto ps = vr::VRSettings()->GetBool(
|
||||
vr::k_pch_CollisionBounds_Section,
|
||||
vr::k_pch_CollisionBounds_PlaySpaceOn_Bool,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError != vr::VRSettingsError_None )
|
||||
{
|
||||
LOG( WARNING ) << "Could not read \""
|
||||
<< vr::k_pch_CollisionBounds_PlaySpaceOn_Bool
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
setPlaySpaceMarker( ps );
|
||||
updateHeight( getBoundsMaxY() );
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -604,9 +604,12 @@ void MoveCenterTabController::eventLoopTick(
|
||||
vr::ETrackingUniverseOrigin universe,
|
||||
vr::TrackedDevicePose_t* devicePoses )
|
||||
{
|
||||
if ( settingsUpdateCounter >= 100 )
|
||||
if ( settingsUpdateCounter >= 149 )
|
||||
{
|
||||
setTrackingUniverse( int( universe ) );
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
setTrackingUniverse( int( universe ) );
|
||||
}
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -309,153 +309,168 @@ void ReviveTabController::eventLoopTick()
|
||||
if ( m_isOverlayInstalled
|
||||
|| parent->m_settingsTabController.forceRevivePage() )
|
||||
{
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 139 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
vr::EVRSettingsError vrSettingsError;
|
||||
|
||||
float valuef
|
||||
= vr::VRSettings()->GetFloat( section_revive,
|
||||
key_pixelsPerDisplayPixel,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
if ( valuef == 0.0 )
|
||||
{
|
||||
setPixelsPerDisplayPixelOverrideEnabled( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
setPixelsPerDisplayPixelOverrideEnabled( true );
|
||||
setPixelsPerDisplayPixelOverride( valuef );
|
||||
}
|
||||
}
|
||||
|
||||
int valuei = vr::VRSettings()->GetInt32(
|
||||
section_revive, key_toggleGrip, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setGripButtonMode( valuei );
|
||||
}
|
||||
|
||||
bool valueb = vr::VRSettings()->GetBool(
|
||||
section_revive, key_triggerAsGrip, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTriggerAsGrip( valueb );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_toggleDelay, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setToggleDelay( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_thumbDeadzone, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setThumbDeadzone( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_thumbSensitivity, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setThumbRange( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchPitch, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchPitch( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchYaw, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchYaw( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchRoll, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchRoll( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchX, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchX( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchY, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchY( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchZ, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchZ( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_playerHeight, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiPlayerHeight( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_eyeHeight, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiEyeHeight( valuef );
|
||||
}
|
||||
|
||||
char buffer[1024];
|
||||
vr::VRSettings()->GetString( section_revive,
|
||||
key_piUser,
|
||||
buffer,
|
||||
1024,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiUsername( buffer );
|
||||
}
|
||||
|
||||
vr::VRSettings()->GetString( section_revive,
|
||||
key_piName,
|
||||
buffer,
|
||||
1024,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiName( buffer );
|
||||
}
|
||||
|
||||
vr::VRSettings()->GetString( section_revive,
|
||||
key_piGender,
|
||||
buffer,
|
||||
1024,
|
||||
&vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
if ( QString( buffer ).compare( "male",
|
||||
Qt::CaseInsensitive )
|
||||
== 0 )
|
||||
{
|
||||
valuei = 1;
|
||||
}
|
||||
else if ( QString( buffer ).compare( "female",
|
||||
Qt::CaseInsensitive )
|
||||
== 0 )
|
||||
{
|
||||
valuei = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
valuei = 0;
|
||||
}
|
||||
setPiGender( valuei );
|
||||
}
|
||||
}
|
||||
settingsUpdateCounter = 0;
|
||||
vr::EVRSettingsError vrSettingsError;
|
||||
|
||||
float valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_pixelsPerDisplayPixel, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
if ( valuef == 0.0 )
|
||||
{
|
||||
setPixelsPerDisplayPixelOverrideEnabled( false );
|
||||
}
|
||||
else
|
||||
{
|
||||
setPixelsPerDisplayPixelOverrideEnabled( true );
|
||||
setPixelsPerDisplayPixelOverride( valuef );
|
||||
}
|
||||
}
|
||||
|
||||
int valuei = vr::VRSettings()->GetInt32(
|
||||
section_revive, key_toggleGrip, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setGripButtonMode( valuei );
|
||||
}
|
||||
|
||||
bool valueb = vr::VRSettings()->GetBool(
|
||||
section_revive, key_triggerAsGrip, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTriggerAsGrip( valueb );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_toggleDelay, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setToggleDelay( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_thumbDeadzone, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setThumbDeadzone( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_thumbSensitivity, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setThumbRange( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchPitch, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchPitch( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchYaw, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchYaw( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchRoll, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchRoll( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchX, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchX( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchY, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchY( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_touchZ, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setTouchZ( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_playerHeight, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiPlayerHeight( valuef );
|
||||
}
|
||||
|
||||
valuef = vr::VRSettings()->GetFloat(
|
||||
section_revive, key_eyeHeight, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiEyeHeight( valuef );
|
||||
}
|
||||
|
||||
char buffer[1024];
|
||||
vr::VRSettings()->GetString(
|
||||
section_revive, key_piUser, buffer, 1024, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiUsername( buffer );
|
||||
}
|
||||
|
||||
vr::VRSettings()->GetString(
|
||||
section_revive, key_piName, buffer, 1024, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
setPiName( buffer );
|
||||
}
|
||||
|
||||
vr::VRSettings()->GetString(
|
||||
section_revive, key_piGender, buffer, 1024, &vrSettingsError );
|
||||
if ( vrSettingsError == vr::VRSettingsError_None )
|
||||
{
|
||||
if ( QString( buffer ).compare( "male", Qt::CaseInsensitive )
|
||||
== 0 )
|
||||
{
|
||||
valuei = 1;
|
||||
}
|
||||
else if ( QString( buffer ).compare( "female",
|
||||
Qt::CaseInsensitive )
|
||||
== 0 )
|
||||
{
|
||||
valuei = 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
valuei = 0;
|
||||
}
|
||||
setPiGender( valuei );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -28,10 +28,13 @@ void SettingsTabController::initStage2( OverlayController* var_parent,
|
||||
|
||||
void SettingsTabController::eventLoopTick()
|
||||
{
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 157 )
|
||||
{
|
||||
setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch(
|
||||
OverlayController::applicationKey ) );
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
setAutoStartEnabled( vr::VRApplications()->GetApplicationAutoLaunch(
|
||||
OverlayController::applicationKey ) );
|
||||
}
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -22,82 +22,88 @@ void SteamVRTabController::initStage2( OverlayController* var_parent,
|
||||
|
||||
void SteamVRTabController::eventLoopTick()
|
||||
{
|
||||
if ( settingsUpdateCounter >= 50 )
|
||||
if ( settingsUpdateCounter >= 97 )
|
||||
{
|
||||
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 )
|
||||
if ( parent->isDashboardVisible() )
|
||||
{
|
||||
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.0 )
|
||||
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( DEBUG ) << "OpenVR returns an error and we have a custom "
|
||||
"supersampling value: "
|
||||
<< m_superSampling;
|
||||
setSuperSampling( 1.0 );
|
||||
LOG( WARNING )
|
||||
<< "Could not read \""
|
||||
<< vr::k_pch_SteamVR_SupersampleManualOverride_Bool
|
||||
<< "\" setting: "
|
||||
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
|
||||
vrSettingsError );
|
||||
}
|
||||
}
|
||||
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 );
|
||||
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.0 )
|
||||
{
|
||||
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 );
|
||||
|
||||
// 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 );
|
||||
// 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 );
|
||||
}
|
||||
setMotionSmoothing( ms );
|
||||
|
||||
settingsUpdateCounter = 0;
|
||||
}
|
||||
else
|
||||
|
||||
@@ -316,7 +316,7 @@ vr::VROverlayHandle_t createBatteryOverlay( vr::TrackedDeviceIndex_t index )
|
||||
|
||||
void UtilitiesTabController::eventLoopTick()
|
||||
{
|
||||
if ( settingsUpdateCounter >= 10 )
|
||||
if ( settingsUpdateCounter >= 19 )
|
||||
{
|
||||
vr::VROverlayHandle_t pOverlayHandle;
|
||||
auto error = vr::VROverlay()->FindOverlay( steamDesktopOverlaykey,
|
||||
|
||||
Reference in New Issue
Block a user