@@ -236,7 +236,7 @@ GameLODManager::GameLODManager(void)
236236 m_userShadowDecalsEnabled = true ;
237237 m_userHeatEffectsEnabled = true ;
238238 m_isQualityReduced = false ;
239- m_sustainedGoodFrames = 0 ;
239+ m_stableFPSDuration = 0 ;
240240 m_userDynamicLOD = DYNAMIC_GAME_LOD_VERY_HIGH ;
241241#endif
242242
@@ -802,7 +802,7 @@ void GameLODManager::updateGraphicsQualityState(float averageFPS)
802802 if (TheGameClient)
803803 TheGameClient->allocateShadows ();
804804 m_isQualityReduced = false ;
805- m_sustainedGoodFrames = 0 ;
805+ m_stableFPSDuration = 0 ;
806806 }
807807
808808 if (!m_isQualityReduced)
@@ -813,7 +813,7 @@ void GameLODManager::updateGraphicsQualityState(float averageFPS)
813813 m_userDynamicLOD = m_currentDynamicLOD;
814814 }
815815
816- m_sustainedGoodFrames = (averageFPS >= 58 .0f ) ? (m_sustainedGoodFrames + 1 ) : 0 ; // Track a duration of sustained good performance
816+ m_stableFPSDuration = (averageFPS >= 58 .0f ) ? (m_stableFPSDuration + 1 ) : 0 ; // Track a duration of sustained good performance
817817
818818 bool shouldReduceQuality = (averageFPS < 56 .0f && TheGameClient && TheGameClient->getFrame () > LOGICFRAMES_PER_SECOND * 10 );
819819 if (shouldReduceQuality && !m_isQualityReduced)
@@ -829,7 +829,7 @@ void GameLODManager::updateGraphicsQualityState(float averageFPS)
829829 // Restore to user preferences after sustained good performance
830830 else if (!shouldReduceQuality && m_isQualityReduced)
831831 {
832- if (m_sustainedGoodFrames > 300 )
832+ if (m_stableFPSDuration > 20 )
833833 {
834834 TheWritableGlobalData->m_useShadowVolumes = m_userShadowVolumesEnabled;
835835 TheWritableGlobalData->m_useShadowDecals = m_userShadowDecalsEnabled;
@@ -842,7 +842,7 @@ void GameLODManager::updateGraphicsQualityState(float averageFPS)
842842 TheGameLODManager->setDynamicLODLevel (lod);
843843
844844 m_isQualityReduced = false ;
845- m_sustainedGoodFrames = 0 ;
845+ m_stableFPSDuration = 0 ;
846846 }
847847 }
848848}
0 commit comments