prefs out of PrefsMan

This commit is contained in:
Glenn Maynard
2005-12-30 04:19:55 +00:00
parent 166b57b497
commit aa2ca76c17
3 changed files with 12 additions and 14 deletions
+12 -5
View File
@@ -25,6 +25,13 @@
static bool g_bQuitting = false;
static RageTimer g_GameplayTimer;
enum BoostAppPriority { BOOST_NO, BOOST_YES, BOOST_AUTO }; /* auto = do whatever is appropriate for the arch. */
static Preference<BoostAppPriority,int> g_BoostAppPriority( "BoostAppPriority", BOOST_AUTO );
/* experimental: force a specific update rate. This prevents big
* animation jumps on frame skips. 0 to disable. */
static Preference<float> g_fConstantUpdateDeltaSeconds( "ConstantUpdateDeltaSeconds", 0 );
static bool UserQuit()
{
return g_bQuitting || ArchHooks::UserQuit();
@@ -57,12 +64,12 @@ static void CheckGameLoopTimerSkips( float fDeltaTime )
static bool ChangeAppPri()
{
if( PREFSMAN->m_BoostAppPriority.Get() == PrefsManager::BOOST_NO )
if( g_BoostAppPriority.Get() == BOOST_NO )
return false;
// if using NTPAD don't boost or else input is laggy
#if defined(_WINDOWS)
if( PREFSMAN->m_BoostAppPriority == PrefsManager::BOOST_AUTO )
if( g_BoostAppPriority == BOOST_AUTO )
{
vector<InputDevice> vDevices;
vector<CString> vDescriptions;
@@ -83,7 +90,7 @@ static bool ChangeAppPri()
/* If -1 and this is a debug build, don't. It makes the debugger sluggish. */
#ifdef DEBUG
if( PREFSMAN->m_BoostAppPriority == PrefsManager::BOOST_AUTO )
if( g_BoostAppPriority == BOOST_AUTO )
return false;
#endif
@@ -125,8 +132,8 @@ void GameLoop()
*/
float fDeltaTime = g_GameplayTimer.GetDeltaTime();
if( PREFSMAN->m_fConstantUpdateDeltaSeconds > 0 )
fDeltaTime = PREFSMAN->m_fConstantUpdateDeltaSeconds;
if( g_fConstantUpdateDeltaSeconds > 0 )
fDeltaTime = g_fConstantUpdateDeltaSeconds;
CheckGameLoopTimerSkips( fDeltaTime );
-2
View File
@@ -343,7 +343,6 @@ PrefsManager::PrefsManager() :
m_bCelShadeModels ( "CelShadeModels", false ), // Work-In-Progress.. disable by default.
m_bPreferredSortUsesGroups ( "PreferredSortUsesGroups", true ),
m_fConstantUpdateDeltaSeconds ( "ConstantUpdateDeltaSeconds", 0 ),
m_fPadStickSeconds ( "PadStickSeconds", 0 ),
m_bForceMipMaps ( "ForceMipMaps", 0 ),
m_bTrilinearFiltering ( "TrilinearFiltering", 0 ),
@@ -355,7 +354,6 @@ PrefsManager::PrefsManager() :
m_bSubSortByNumSteps ( "SubSortByNumSteps", false ),
m_GetRankingName ( "GetRankingName", RANKING_ON ),
m_ScoringType ( "ScoringType", SCORING_NEW ),
m_BoostAppPriority ( "BoostAppPriority", BOOST_AUTO ),
m_sAdditionalSongFolders ( "AdditionalSongFolders", "" ),
m_sAdditionalFolders ( "AdditionalFolders", "" ),
m_sLastSeenVideoDriver ( "LastSeenVideoDriver", "" ),
-7
View File
@@ -187,10 +187,6 @@ public:
Preference<bool> m_bCelShadeModels;
Preference<bool> m_bPreferredSortUsesGroups;
/* experimental: force a specific update rate. This prevents big
* animation jumps on frame skips. */
Preference<float> m_fConstantUpdateDeltaSeconds; // 0 to disable
// Number of seconds it takes for a button on the controller to release
// after pressed.
Preference<float> m_fPadStickSeconds;
@@ -218,9 +214,6 @@ public:
enum ScoringType { SCORING_NEW, SCORING_OLD };
Preference<ScoringType,int> m_ScoringType;
enum BoostAppPriority { BOOST_NO, BOOST_YES, BOOST_AUTO }; /* auto = do whatever is appropriate for the arch. */
Preference<BoostAppPriority,int> m_BoostAppPriority;
Preference<CString> m_sAdditionalSongFolders;
Preference<CString> m_sAdditionalFolders;