Improve readability of vsync and settings update code
This commit is contained in:
@@ -116,6 +116,19 @@ void AccessibilityTabController::eventLoopTick(
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 151 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 151 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 151 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -168,6 +168,19 @@ void AudioTabController::eventLoopTick()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// 89 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 89 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 89 )
|
||||
{
|
||||
if ( m_micProximitySensorCanMute )
|
||||
|
||||
@@ -649,6 +649,18 @@ void ChaperoneTabController::eventLoopTick(
|
||||
}
|
||||
}
|
||||
|
||||
// 101 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 101 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 101 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -976,6 +976,18 @@ void MoveCenterTabController::eventLoopTick(
|
||||
vr::ETrackingUniverseOrigin universe,
|
||||
vr::TrackedDevicePose_t* devicePoses )
|
||||
{
|
||||
// 149 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 149 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 149 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -309,6 +309,18 @@ void ReviveTabController::eventLoopTick()
|
||||
if ( m_isOverlayInstalled
|
||||
|| parent->m_settingsTabController.forceRevivePage() )
|
||||
{
|
||||
// 139 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 139 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 139 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -28,6 +28,18 @@ void SettingsTabController::initStage2( OverlayController* var_parent,
|
||||
|
||||
void SettingsTabController::eventLoopTick()
|
||||
{
|
||||
// 157 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 157 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SteamVRTabController: 97
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 157 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -22,6 +22,18 @@ void SteamVRTabController::initStage2( OverlayController* var_parent,
|
||||
|
||||
void SteamVRTabController::eventLoopTick()
|
||||
{
|
||||
// 97 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 97 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// UtilitiesTabController: 19
|
||||
if ( settingsUpdateCounter >= 97 )
|
||||
{
|
||||
if ( parent->isDashboardVisible() )
|
||||
|
||||
@@ -321,6 +321,18 @@ vr::VROverlayHandle_t createBatteryOverlay( vr::TrackedDeviceIndex_t index )
|
||||
|
||||
void UtilitiesTabController::eventLoopTick()
|
||||
{
|
||||
// 19 was chosen because it's a prime number (to reduce overlap of
|
||||
// simultaneous settings updates).
|
||||
// Actual rate of updates is 19 * vsync (~11ms)
|
||||
// Values chosen based on update speed priority
|
||||
// Values in other tabs are as follows (avoid using same values):
|
||||
// AccessibiltyTabController: 151
|
||||
// AudioTabController: 89
|
||||
// ChaperoneTabController: 101
|
||||
// MoveCenterTabController: 149
|
||||
// ReviveTabController: 139
|
||||
// SettingsTabController: 157
|
||||
// SteamVRTabController: 97
|
||||
if ( settingsUpdateCounter >= 19 )
|
||||
{
|
||||
vr::VROverlayHandle_t pOverlayHandle;
|
||||
|
||||
Reference in New Issue
Block a user