add g_bAutoRestart

This commit is contained in:
Glenn Maynard
2003-10-16 08:55:32 +00:00
parent cd195dc6b7
commit 6e5a5efe73
2 changed files with 9 additions and 1 deletions
+5 -1
View File
@@ -26,6 +26,8 @@ PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our pro
const float DEFAULT_SOUND_VOLUME = 0.50;
bool g_bAutoRestart = false;
PrefsManager::PrefsManager()
{
#ifdef DEBUG
@@ -144,7 +146,7 @@ PrefsManager::PrefsManager()
m_fCenterImageScaleY = 1;
m_bAttractSound = true;
g_bAutoRestart = false;
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
#ifdef _XBOX
@@ -310,6 +312,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
ini.GetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
ini.GetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
ini.GetValue( "Options", "AttractSound", m_bAttractSound );
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
CString sAdditionalSongFolders;
if( ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders ) )
@@ -437,6 +440,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
ini.SetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
ini.SetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
ini.SetValue( "Options", "AttractSound", m_bAttractSound );
ini.SetValue( "Options", "AutoRestart", g_bAutoRestart );
/* Only write these if they aren't the default. This ensures that we can change
* the default and have it take effect for everyone (except people who
+4
View File
@@ -154,6 +154,10 @@ public:
void SaveGamePrefsToDisk();
};
/* This is global, because it can be accessed by crash handlers and error handlers
* that are run after PREFSMAN shuts down (and probably don't want to deref tht
* pointer anyway). */
extern bool g_bAutoRestart;
extern PrefsManager* PREFSMAN; // global and accessable from anywhere in our program