Update OpenVR from 1.8.19 -> 1.9.16 and remove Sync() calls

Release log:
https://github.com/ValveSoftware/openvr/releases/tag/v1.9.16
```
Removed sync function. Saving of settings is controlled automatically by
the system now. All existing calls to Sync can be deleted. Calls to sync
using old APIs do nothing.
```
This commit is contained in:
Vasily
2020-01-18 00:17:28 +01:00
committed by username223
parent b6eaca6caa
commit 0c7c888c82
19 changed files with 496 additions and 203 deletions
-14
View File
@@ -525,7 +525,6 @@ void AudioTabController::setMirrorDeviceIndex( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setMirrorDevice( "", notify );
}
}
@@ -551,7 +550,6 @@ void AudioTabController::setMirrorDeviceIndex( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setMirrorDevice(
m_playbackDevices[static_cast<size_t>( index )].id(),
notify );
@@ -934,10 +932,6 @@ void AudioTabController::deleteAudioProfile( unsigned index )
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
else
{
vr::VRSettings()->Sync();
}
vr::VRSettings()->RemoveKeyInSection(
vr::k_pch_audio_Section,
@@ -952,10 +946,6 @@ void AudioTabController::deleteAudioProfile( unsigned index )
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
else
{
vr::VRSettings()->Sync();
}
}
audioProfiles.erase( pos );
saveAudioProfiles();
@@ -1148,7 +1138,6 @@ void AudioTabController::setDefaultPlayback( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setPlaybackDevice(
m_playbackDevices[static_cast<size_t>( index )].id(), notify );
}
@@ -1172,7 +1161,6 @@ void AudioTabController::setDefaultMic( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setMicDevice(
m_recordingDevices[static_cast<size_t>( index )].id(), notify );
}
@@ -1197,7 +1185,6 @@ void AudioTabController::setDefaultMirror( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setMirrorDevice( "", notify );
}
}
@@ -1219,7 +1206,6 @@ void AudioTabController::setDefaultMirror( int index, bool notify )
}
else
{
vr::VRSettings()->Sync();
audioManager->setMirrorDevice(
m_playbackDevices[static_cast<size_t>( index )].id(), notify );
}
@@ -372,7 +372,6 @@ void ChaperoneTabController::handleChaperoneWarnings( float distance )
}
else
{
vr::VRSettings()->Sync( true );
m_chaperoneSwitchToBeginnerActive = true;
}
}
@@ -395,7 +394,6 @@ void ChaperoneTabController::handleChaperoneWarnings( float distance )
}
else
{
vr::VRSettings()->Sync( true );
m_chaperoneSwitchToBeginnerActive = false;
}
}
@@ -707,7 +705,6 @@ void ChaperoneTabController::setBoundsVisibility( float value, bool notify )
vr::k_pch_CollisionBounds_ColorGammaA_Int32,
static_cast<int32_t>( 255 * m_visibility ) );
vr::VRSettings()->Sync();
if ( notify )
{
emit boundsVisibilityChanged( m_visibility );
@@ -729,7 +726,6 @@ void ChaperoneTabController::setFadeDistance( float value, bool notify )
vr::k_pch_CollisionBounds_Section,
vr::k_pch_CollisionBounds_FadeDistance_Float,
m_fadeDistance );
vr::VRSettings()->Sync();
if ( notify )
{
emit fadeDistanceChanged( m_fadeDistance );
@@ -781,7 +777,6 @@ void ChaperoneTabController::setCenterMarker( bool value, bool notify )
vr::k_pch_CollisionBounds_Section,
vr::k_pch_CollisionBounds_CenterMarkerOn_Bool,
m_centerMarker );
vr::VRSettings()->Sync();
if ( notify )
{
emit centerMarkerChanged( m_centerMarker );
@@ -802,7 +797,6 @@ void ChaperoneTabController::setPlaySpaceMarker( bool value, bool notify )
vr::VRSettings()->SetBool( vr::k_pch_CollisionBounds_Section,
vr::k_pch_CollisionBounds_PlaySpaceOn_Bool,
m_playSpaceMarker );
vr::VRSettings()->Sync();
if ( notify )
{
emit playSpaceMarkerChanged( m_playSpaceMarker );
@@ -932,10 +926,6 @@ void ChaperoneTabController::setChaperoneSwitchToBeginnerEnabled( bool value,
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
else
{
vr::VRSettings()->Sync( true );
}
}
m_chaperoneSwitchToBeginnerActive = false;
@@ -1436,7 +1426,6 @@ void ChaperoneTabController::applyChaperoneProfile( unsigned index )
setChaperoneShowDashboardEnabled(
profile.enableChaperoneShowDashboard );
}
vr::VRSettings()->Sync( true );
}
}
@@ -1595,7 +1584,6 @@ void ChaperoneTabController::reset()
setForceBounds( false );
vr::VRSettings()->Sync();
settingsUpdateCounter = 999; // Easiest way to get default values
}
@@ -1704,10 +1692,6 @@ void ChaperoneTabController::shutdown()
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
else
{
vr::VRSettings()->Sync( true );
}
}
}
@@ -178,7 +178,6 @@ void SteamVRTabController::setPerformanceGraph( const bool 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 );
@@ -201,7 +200,6 @@ void SteamVRTabController::setMultipleDriver( const bool value,
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_ActivateMultipleDrivers_Bool,
m_multipleDriverToggle );
vr::VRSettings()->Sync();
if ( notify )
{
emit multipleDriverChanged( m_multipleDriverToggle );
@@ -223,7 +221,6 @@ void SteamVRTabController::setNoFadeToGrid( const bool value,
vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_DoNotFadeToGrid,
m_noFadeToGridToggle );
vr::VRSettings()->Sync();
if ( notify )
{
emit noFadeToGridChanged( m_noFadeToGridToggle );
@@ -246,7 +243,6 @@ void SteamVRTabController::setSystemButton( const bool value,
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SendSystemButtonToAllApps_Bool,
m_systemButtonToggle );
vr::VRSettings()->Sync();
if ( notify )
{
emit systemButtonChanged( m_systemButtonToggle );
@@ -267,7 +263,6 @@ void SteamVRTabController::setDND( const bool value, const bool notify )
vr::VRSettings()->SetBool( vr::k_pch_Notifications_Section,
vr::k_pch_Notifications_DoNotDisturb_Bool,
m_dnd );
vr::VRSettings()->Sync();
if ( notify )
{
emit dNDChanged( m_dnd );
@@ -292,7 +287,6 @@ void SteamVRTabController::setCameraActive( const bool value,
vr::VRSettings()->SetBool( vr::k_pch_Camera_Section,
vr::k_pch_Camera_EnableCamera_Bool,
m_cameraActive );
vr::VRSettings()->Sync();
if ( notify )
{
emit cameraActiveChanged( m_cameraActive );
@@ -315,7 +309,6 @@ void SteamVRTabController::setCameraBounds( const bool value,
vr::k_pch_Camera_Section,
vr::k_pch_Camera_EnableCameraForCollisionBounds_Bool,
m_cameraBounds );
vr::VRSettings()->Sync();
if ( notify )
{
emit cameraBoundsChanged( m_cameraBounds );
@@ -337,7 +330,6 @@ void SteamVRTabController::setCameraRoom( const bool value, const bool notify )
vr::k_pch_Camera_Section,
vr::k_pch_Camera_EnableCameraForRoomView_Bool,
m_cameraRoom );
vr::VRSettings()->Sync();
if ( notify )
{
emit cameraRoomChanged( m_cameraRoom );
@@ -380,7 +372,6 @@ void SteamVRTabController::setCameraDashboard( const bool value,
vr::k_pch_Camera_Section,
vr::k_pch_Camera_EnableCameraInDashboard_Bool,
m_cameraDashboard );
vr::VRSettings()->Sync();
if ( notify )
{
emit cameraDashboardChanged( m_cameraDashboard );
-10
View File
@@ -519,7 +519,6 @@ void VideoTabController::setColorRed( float value, bool notify, bool keepValue )
LOG( DEBUG ) << "Changed Red Value to: " << colorRed();
vr::VRSettings()->Sync();
if ( notify )
{
emit colorRedChanged( colorRed() );
@@ -570,7 +569,6 @@ void VideoTabController::setColorGreen( float value,
LOG( DEBUG ) << "Changed Green Value to: " << colorGreen();
vr::VRSettings()->Sync();
if ( notify )
{
emit colorGreenChanged( colorGreen() );
@@ -620,7 +618,6 @@ void VideoTabController::setColorBlue( float value,
LOG( DEBUG ) << "Changed Blue Value to: " << colorBlue();
vr::VRSettings()->Sync();
if ( notify )
{
emit colorBlueChanged( colorBlue() );
@@ -712,7 +709,6 @@ void VideoTabController::initSupersampleOverride()
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
vr::VRSettings()->Sync();
setAllowSupersampleOverride( temporary, true );
}
@@ -737,7 +733,6 @@ void VideoTabController::setSuperSampling( float value, const bool notify )
vr::VRSettings()->SetFloat( vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleScale_Float,
m_superSampling );
vr::VRSettings()->Sync();
if ( notify )
{
emit superSamplingChanged( m_superSampling );
@@ -755,7 +750,6 @@ void VideoTabController::setAllowSupersampleOverride( const bool value,
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_SupersampleManualOverride_Bool,
m_allowSupersampleOverride );
vr::VRSettings()->Sync();
if ( notify )
{
emit allowSupersampleOverrideChanged( m_allowSupersampleOverride );
@@ -783,7 +777,6 @@ void VideoTabController::setMotionSmoothing( const bool value,
vr::VRSettings()->SetBool( vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_MotionSmoothing_Bool,
m_motionSmoothing );
vr::VRSettings()->Sync();
if ( notify )
{
emit motionSmoothingChanged( m_motionSmoothing );
@@ -807,7 +800,6 @@ void VideoTabController::initMotionSmoothing()
<< vr::VRSettings()->GetSettingsErrorNameFromEnum(
vrSettingsError );
}
vr::VRSettings()->Sync();
setMotionSmoothing( temporary, true );
}
@@ -826,7 +818,6 @@ void VideoTabController::setAllowSupersampleFiltering( const bool value,
vr::k_pch_SteamVR_Section,
vr::k_pch_SteamVR_AllowSupersampleFiltering_Bool,
m_allowSupersampleFiltering );
vr::VRSettings()->Sync();
if ( notify )
{
emit allowSupersampleFilteringChanged(
@@ -893,7 +884,6 @@ void VideoTabController::applyVideoProfile( const unsigned index )
setBrightnessEnabled( profile.brightnessToggle );
setBrightnessValue( profile.brightnessValue );
setColorOverlayOpacity( profile.opacity );
vr::VRSettings()->Sync( true );
}
}
-4
View File
@@ -141,7 +141,6 @@ void installApplicationManifest( const std::string manifestPath )
vr::VRApplications()->GetApplicationsErrorNameFromEnum(
app_error ) ) );
}
vr::VRSettings()->Sync( true );
}
}
@@ -153,7 +152,6 @@ void removeApplicationManifest( const std::string manifestPath )
{
vr::VRApplications()->RemoveApplicationManifest( manifestPath.c_str() );
LOG( INFO ) << "Attempting to Remove Manifest At: " << manifestPath;
vr::VRSettings()->Sync( true );
}
if ( vr::VRApplications()->IsApplicationInstalled(
application_strings::applicationKey ) )
@@ -270,8 +268,6 @@ void forceRemoveApplicationManifest()
{
throw std::runtime_error( "Could not find application manifest." );
}
// Keep Settings Clean
vr::VRSettings()->Sync( true );
if ( installManifest )
{
reinstallApplicationManifest( *manifestPath );