add pref ConstantUpdateDeltaSeconds
This commit is contained in:
@@ -42,6 +42,7 @@ void PrefsManager::Init()
|
||||
m_iRefreshRate = REFRESH_DEFAULT;
|
||||
m_bOnlyDedicatedMenuButtons = false;
|
||||
m_bCelShadeModels = false; // Work-In-Progress.. disable by default.
|
||||
m_fConstantUpdateDeltaSeconds = 0;
|
||||
#ifdef DEBUG
|
||||
m_bShowStats = true;
|
||||
#else
|
||||
@@ -330,6 +331,7 @@ void PrefsManager::ReadPrefsFromFile( CString sIni )
|
||||
ini.GetValue( "Options", "ScreenHeight", m_fScreenHeight );
|
||||
#endif
|
||||
ini.GetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||
ini.GetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||
ini.GetValue( "Options", "DisplayWidth", m_iDisplayWidth );
|
||||
ini.GetValue( "Options", "DisplayHeight", m_iDisplayHeight );
|
||||
ini.GetValue( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
|
||||
@@ -563,6 +565,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
|
||||
ini.SetValue( "Options", "Windowed", m_bWindowed );
|
||||
ini.SetValue( "Options", "CelShadeModels", m_bCelShadeModels );
|
||||
ini.SetValue( "Options", "ConstantUpdateDeltaSeconds", m_fConstantUpdateDeltaSeconds );
|
||||
ini.SetValue( "Options", "DisplayWidth", m_iDisplayWidth );
|
||||
ini.SetValue( "Options", "DisplayHeight", m_iDisplayHeight );
|
||||
ini.SetValue( "Options", "DisplayColorDepth", m_iDisplayColorDepth );
|
||||
|
||||
@@ -202,6 +202,10 @@ public:
|
||||
int m_iMaxHighScoresPerListForPlayer;
|
||||
bool m_bCelShadeModels;
|
||||
|
||||
/* experimental: force a specific update rate. This prevents big
|
||||
* animation jumps on frame skips. */
|
||||
float m_fConstantUpdateDeltaSeconds; // 0 to disable
|
||||
|
||||
// Number of seconds it takes for a button on the controller to release
|
||||
// after pressed.
|
||||
float m_fPadStickSeconds;
|
||||
|
||||
@@ -1496,6 +1496,9 @@ static void GameLoop()
|
||||
* Update
|
||||
*/
|
||||
float fDeltaTime = timer.GetDeltaTime();
|
||||
|
||||
if( PREFSMAN->m_fConstantUpdateDeltaSeconds > 0 )
|
||||
fDeltaTime = PREFSMAN->m_fConstantUpdateDeltaSeconds;
|
||||
|
||||
CheckSkips( fDeltaTime );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user