add m_fSoundVolume

This commit is contained in:
Glenn Maynard
2003-01-11 04:03:21 +00:00
parent a5dbeccada
commit 835c8c3b06
2 changed files with 8 additions and 1 deletions
+6
View File
@@ -24,6 +24,7 @@
PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program PrefsManager* PREFSMAN = NULL; // global and accessable from anywhere in our program
const float DEFAULT_SOUND_VOLUME = 0.50;
PrefsManager::PrefsManager() PrefsManager::PrefsManager()
{ {
@@ -74,6 +75,7 @@ PrefsManager::PrefsManager()
m_bVsync = true; m_bVsync = true;
m_bSoundDrivers = DEFAULT_SOUND_DRIVER_LIST; m_bSoundDrivers = DEFAULT_SOUND_DRIVER_LIST;
m_fSoundVolume = DEFAULT_SOUND_VOLUME;
ReadGlobalPrefsFromDisk( true ); ReadGlobalPrefsFromDisk( true );
} }
@@ -125,6 +127,7 @@ PrefsManager::~PrefsManager()
ini.GetValueB( "Options", "MusicWheelUsesSections", m_bMusicWheelUsesSections ); ini.GetValueB( "Options", "MusicWheelUsesSections", m_bMusicWheelUsesSections );
ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast ); ini.GetValueB( "Options", "ChangeBannersWhenFast", m_bChangeBannersWhenFast );
ini.GetValue ( "Options", "SoundDrivers", m_bSoundDrivers ); ini.GetValue ( "Options", "SoundDrivers", m_bSoundDrivers );
ini.GetValueF( "Options", "SoundVolume", m_fSoundVolume );
m_asAdditionalSongFolders.clear(); m_asAdditionalSongFolders.clear();
CString sAdditionalSongFolders; CString sAdditionalSongFolders;
@@ -186,6 +189,9 @@ void PrefsManager::SaveGlobalPrefsToDisk()
* tweaked this value). */ * tweaked this value). */
if(m_bSoundDrivers != DEFAULT_SOUND_DRIVER_LIST) if(m_bSoundDrivers != DEFAULT_SOUND_DRIVER_LIST)
ini.SetValue ( "Options", "SoundDrivers", m_bSoundDrivers ); ini.SetValue ( "Options", "SoundDrivers", m_bSoundDrivers );
if(m_fSoundVolume != DEFAULT_SOUND_VOLUME)
ini.SetValueF( "Options", "SoundVolume", m_fSoundVolume );
ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) ); ini.SetValue( "Options", "AdditionalSongFolders", join(",", m_asAdditionalSongFolders) );
+1
View File
@@ -59,6 +59,7 @@ public:
CString m_DWIPath; CString m_DWIPath;
CString m_bSoundDrivers; CString m_bSoundDrivers;
float m_fSoundVolume;
void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame ); void ReadGlobalPrefsFromDisk( bool bSwitchToLastPlayedGame );
void SaveGlobalPrefsToDisk(); void SaveGlobalPrefsToDisk();