add g_bAutoRestart
This commit is contained in:
@@ -26,6 +26,8 @@ PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our pro
|
|||||||
|
|
||||||
const float DEFAULT_SOUND_VOLUME = 0.50;
|
const float DEFAULT_SOUND_VOLUME = 0.50;
|
||||||
|
|
||||||
|
bool g_bAutoRestart = false;
|
||||||
|
|
||||||
PrefsManager::PrefsManager()
|
PrefsManager::PrefsManager()
|
||||||
{
|
{
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
@@ -144,7 +146,7 @@ PrefsManager::PrefsManager()
|
|||||||
m_fCenterImageScaleY = 1;
|
m_fCenterImageScaleY = 1;
|
||||||
|
|
||||||
m_bAttractSound = true;
|
m_bAttractSound = true;
|
||||||
|
g_bAutoRestart = false;
|
||||||
|
|
||||||
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
|
/* XXX: Set these defaults for individual consoles using VideoCardDefaults.ini. */
|
||||||
#ifdef _XBOX
|
#ifdef _XBOX
|
||||||
@@ -310,6 +312,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
|||||||
ini.GetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
|
ini.GetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
|
||||||
ini.GetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
|
ini.GetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
|
||||||
ini.GetValue( "Options", "AttractSound", m_bAttractSound );
|
ini.GetValue( "Options", "AttractSound", m_bAttractSound );
|
||||||
|
ini.GetValue( "Options", "AutoRestart", g_bAutoRestart );
|
||||||
|
|
||||||
CString sAdditionalSongFolders;
|
CString sAdditionalSongFolders;
|
||||||
if( ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders ) )
|
if( ini.GetValue( "Options", "AdditionalSongFolders", sAdditionalSongFolders ) )
|
||||||
@@ -437,6 +440,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
|||||||
ini.SetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
|
ini.SetValue( "Options", "CenterImageScaleX", m_fCenterImageScaleX );
|
||||||
ini.SetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
|
ini.SetValue( "Options", "CenterImageScaleY", m_fCenterImageScaleY );
|
||||||
ini.SetValue( "Options", "AttractSound", m_bAttractSound );
|
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
|
/* 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
|
* the default and have it take effect for everyone (except people who
|
||||||
|
|||||||
@@ -154,6 +154,10 @@ public:
|
|||||||
void SaveGamePrefsToDisk();
|
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
|
extern PrefsManager* PREFSMAN; // global and accessable from anywhere in our program
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user