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