m_bCheckSongCacheOnLoad -> !m_bFastLoad
This commit is contained in:
@@ -95,7 +95,7 @@ PrefsManager::PrefsManager()
|
||||
m_bTexturePreload = false;
|
||||
m_bDelayedScreenLoad = false;
|
||||
m_BannerCache = BNCACHE_LOW_RES;
|
||||
m_bCheckSongCacheOnLoad = true;
|
||||
m_bFastLoad = false;
|
||||
m_MusicWheelUsesSections = ALWAYS;
|
||||
m_iMusicWheelSwitchSpeed = 10;
|
||||
m_bEasterEggs = true;
|
||||
@@ -299,7 +299,7 @@ void PrefsManager::ReadGlobalPrefsFromDisk()
|
||||
ini.GetValue( "Options", "TexturePreload", m_bTexturePreload );
|
||||
ini.GetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||
ini.GetValue( "Options", "BannerCache", (int&)m_BannerCache );
|
||||
ini.GetValue( "Options", "CheckSongCacheOnLoad", m_bCheckSongCacheOnLoad );
|
||||
ini.GetValue( "Options", "FastLoad", m_bFastLoad );
|
||||
ini.GetValue( "Options", "MusicWheelUsesSections", (int&)m_MusicWheelUsesSections );
|
||||
ini.GetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||
ini.GetValue( "Options", "SoundDrivers", m_sSoundDrivers );
|
||||
@@ -465,7 +465,7 @@ void PrefsManager::SaveGlobalPrefsToDisk() const
|
||||
ini.SetValue( "Options", "TexturePreload", m_bTexturePreload );
|
||||
ini.SetValue( "Options", "DelayedScreenLoad", m_bDelayedScreenLoad );
|
||||
ini.SetValue( "Options", "BannerCache", m_BannerCache );
|
||||
ini.SetValue( "Options", "CheckSongCacheOnLoad", m_bCheckSongCacheOnLoad );
|
||||
ini.SetValue( "Options", "FastLoad", m_bFastLoad );
|
||||
ini.SetValue( "Options", "MusicWheelUsesSections", m_MusicWheelUsesSections );
|
||||
ini.SetValue( "Options", "MusicWheelSwitchSpeed", m_iMusicWheelSwitchSpeed );
|
||||
ini.SetValue( "Options", "EasterEggs", m_bEasterEggs );
|
||||
|
||||
@@ -48,7 +48,7 @@ public:
|
||||
bool m_bDelayedScreenLoad;
|
||||
enum BannerCacheMode { BNCACHE_OFF, BNCACHE_LOW_RES, BNCACHE_FULL };
|
||||
BannerCacheMode m_BannerCache;
|
||||
bool m_bCheckSongCacheOnLoad;
|
||||
bool m_bFastLoad;
|
||||
|
||||
bool m_bOnlyDedicatedMenuButtons;
|
||||
bool m_bMenuTimer;
|
||||
|
||||
@@ -212,7 +212,7 @@ MOVE( Lyrics, PREFSMAN->m_bShowLyrics );
|
||||
/* Misc. options */
|
||||
MOVE( AutogenMissingTypes, PREFSMAN->m_bAutogenMissingTypes );
|
||||
MOVE( AutogenGroupCourses, PREFSMAN->m_bAutogenGroupCourses );
|
||||
MOVE( CheckSongCacheOnLoad, PREFSMAN->m_bCheckSongCacheOnLoad );
|
||||
MOVE( FastLoad, PREFSMAN->m_bFastLoad );
|
||||
|
||||
/* Background options */
|
||||
MOVE( BackgroundMode, PREFSMAN->m_BackgroundMode );
|
||||
@@ -424,7 +424,7 @@ static const ConfOption g_ConfOptions[] =
|
||||
/* Misc options */
|
||||
ConfOption( "Autogen\nMissing Types", AutogenMissingTypes, "OFF","ON" ),
|
||||
ConfOption( "Autogen\nGroup Courses", AutogenGroupCourses, "OFF","ON" ),
|
||||
ConfOption( "Fast\nLoad", CheckSongCacheOnLoad,"OFF","ON" ),
|
||||
ConfOption( "Fast\nLoad", FastLoad, "OFF","ON" ),
|
||||
|
||||
/* Background options */
|
||||
ConfOption( "Background\nMode", BackgroundMode, "OFF","ANIMATIONS","VISUALIZATIONS","RANDOM MOVIES" ),
|
||||
|
||||
@@ -190,8 +190,8 @@ NotesLoader *Song::MakeLoader( CString sDir ) const
|
||||
static set<istring> BlacklistedImages;
|
||||
|
||||
/*
|
||||
* If PREFSMAN->m_bCheckSongCacheOnLoad is false, always load from cache if possible.
|
||||
* Don't load the contents of sDir if we can avoid it. That means we can't call HasMusic(),
|
||||
* If PREFSMAN->m_bFastLoad is true, always load from cache if possible. Don't read
|
||||
* the contents of sDir if we can avoid it. That means we can't call HasMusic(),
|
||||
* HasBanner() or GetHashForDirectory().
|
||||
*
|
||||
* If true, check the directory hash and reload the song from scratch if it's changed.
|
||||
@@ -222,7 +222,7 @@ bool Song::LoadFromSongDir( CString sDir )
|
||||
bool bUseCache = true;
|
||||
if( !DoesFileExist(GetCacheFilePath()) )
|
||||
bUseCache = false;
|
||||
if( PREFSMAN->m_bCheckSongCacheOnLoad && GetHashForDirectory(m_sSongDir) != uDirHash )
|
||||
if( !PREFSMAN->m_bFastLoad && GetHashForDirectory(m_sSongDir) != uDirHash )
|
||||
bUseCache = false; // this cache is out of date
|
||||
|
||||
if( bUseCache )
|
||||
|
||||
@@ -98,16 +98,16 @@ void SongManager::Reload()
|
||||
m_sGroupNames.clear();
|
||||
m_sGroupBannerPaths.clear();
|
||||
|
||||
/* Always do m_bCheckSongCacheOnLoad. */
|
||||
const bool OldVal = PREFSMAN->m_bCheckSongCacheOnLoad;
|
||||
PREFSMAN->m_bCheckSongCacheOnLoad = true;
|
||||
/* Always check songs for changes. */
|
||||
const bool OldVal = PREFSMAN->m_bFastLoad;
|
||||
PREFSMAN->m_bFastLoad = false;
|
||||
|
||||
InitSongsFromDisk(NULL);
|
||||
InitCoursesFromDisk(NULL);
|
||||
InitAutogenCourses();
|
||||
PROFILEMAN->InitMachineScoresFromDisk();
|
||||
|
||||
PREFSMAN->m_bCheckSongCacheOnLoad = OldVal;
|
||||
PREFSMAN->m_bFastLoad = OldVal;
|
||||
}
|
||||
|
||||
void SongManager::InitSongsFromDisk( LoadingWindow *ld )
|
||||
|
||||
Reference in New Issue
Block a user